/// <summary> /// Gets the virtual machine details /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='userName'> /// The name of the user. /// </param> /// <param name='environmentOperationsPayload'> /// Represents payload for any Environment operations like get, start, stop, /// connect /// </param> /// <param name='expand'> /// Specify the $expand query. Example: 'properties($expand=environment)' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <GetEnvironmentResponse> GetEnvironmentAsync(this IGlobalUsersOperations operations, string userName, EnvironmentOperationsPayload environmentOperationsPayload, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetEnvironmentWithHttpMessagesAsync(userName, environmentOperationsPayload, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List labs for the user. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='userName'> /// The name of the user. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ListLabsResponse> ListLabsAsync(this IGlobalUsersOperations operations, string userName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListLabsWithHttpMessagesAsync(userName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the status of long running operation /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='userName'> /// The name of the user. /// </param> /// <param name='operationStatusPayload'> /// Payload to get the status of an operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <OperationStatusResponse> GetOperationStatusAsync(this IGlobalUsersOperations operations, string userName, OperationStatusPayload operationStatusPayload, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetOperationStatusWithHttpMessagesAsync(userName, operationStatusPayload, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get batch operation status /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='userName'> /// The name of the user. /// </param> /// <param name='operationBatchStatusPayload'> /// Payload to get the status of an operation /// </param> public static OperationBatchStatusResponse GetOperationBatchStatus(this IGlobalUsersOperations operations, string userName, OperationBatchStatusPayload operationBatchStatusPayload) { return(operations.GetOperationBatchStatusAsync(userName, operationBatchStatusPayload).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='userName'> /// The name of the user. /// </param> /// <param name='environmentOperationsPayload'> /// Represents payload for any Environment operations like get, start, stop, /// connect /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginStopEnvironmentAsync(this IGlobalUsersOperations operations, string userName, EnvironmentOperationsPayload environmentOperationsPayload, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginStopEnvironmentWithHttpMessagesAsync(userName, environmentOperationsPayload, 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='userName'> /// The name of the user. /// </param> /// <param name='environmentOperationsPayload'> /// Represents payload for any Environment operations like get, start, stop, /// connect /// </param> public static void BeginStopEnvironment(this IGlobalUsersOperations operations, string userName, EnvironmentOperationsPayload environmentOperationsPayload) { operations.BeginStopEnvironmentAsync(userName, environmentOperationsPayload).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='userName'> /// The name of the user. /// </param> /// <param name='resetPasswordPayload'> /// Represents the payload for resetting passwords. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginResetPasswordAsync(this IGlobalUsersOperations operations, string userName, ResetPasswordPayload resetPasswordPayload, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginResetPasswordWithHttpMessagesAsync(userName, resetPasswordPayload, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <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='userName'> /// The name of the user. /// </param> /// <param name='resetPasswordPayload'> /// Represents the payload for resetting passwords. /// </param> public static void BeginResetPassword(this IGlobalUsersOperations operations, string userName, ResetPasswordPayload resetPasswordPayload) { operations.BeginResetPasswordAsync(userName, resetPasswordPayload).GetAwaiter().GetResult(); }
/// <summary> /// Gets the virtual machine details /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='userName'> /// The name of the user. /// </param> /// <param name='environmentOperationsPayload'> /// Represents payload for any Environment operations like get, start, stop, /// connect /// </param> /// <param name='expand'> /// Specify the $expand query. Example: 'properties($expand=environment)' /// </param> public static GetEnvironmentResponse GetEnvironment(this IGlobalUsersOperations operations, string userName, EnvironmentOperationsPayload environmentOperationsPayload, string expand = default(string)) { return(operations.GetEnvironmentAsync(userName, environmentOperationsPayload, expand).GetAwaiter().GetResult()); }
/// <summary> /// Register a user to a managed lab /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='userName'> /// The name of the user. /// </param> /// <param name='registerPayload'> /// Represents payload for Register action. /// </param> public static void Register(this IGlobalUsersOperations operations, string userName, RegisterPayload registerPayload) { operations.RegisterAsync(userName, registerPayload).GetAwaiter().GetResult(); }
/// <summary> /// List labs for the user. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='userName'> /// The name of the user. /// </param> public static ListLabsResponse ListLabs(this IGlobalUsersOperations operations, string userName) { return(operations.ListLabsAsync(userName).GetAwaiter().GetResult()); }
/// <summary> /// List Environments for the user /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='userName'> /// The name of the user. /// </param> /// <param name='listEnvironmentsPayload'> /// Represents the payload to list environments owned by a user /// </param> public static ListEnvironmentsResponse ListEnvironments(this IGlobalUsersOperations operations, string userName, ListEnvironmentsPayload listEnvironmentsPayload) { return(operations.ListEnvironmentsAsync(userName, listEnvironmentsPayload).GetAwaiter().GetResult()); }
/// <summary> /// Get personal preferences for a user /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='userName'> /// The name of the user. /// </param> /// <param name='personalPerferencesOperationsPayload'> /// Represents payload for any Environment operations like get, start, stop, /// connect /// </param> public static GetPersonalPreferencesResponse GetPersonalPreferences(this IGlobalUsersOperations operations, string userName, PersonalPerferencesOperationsPayload personalPerferencesOperationsPayload) { return(operations.GetPersonalPreferencesAsync(userName, personalPerferencesOperationsPayload).GetAwaiter().GetResult()); }