/// <summary>Snippet for StartEnvironmentAsync</summary> public async Task StartEnvironmentRequestObjectAsync() { // Snippet: StartEnvironmentAsync(StartEnvironmentRequest, CallSettings) // Additional: StartEnvironmentAsync(StartEnvironmentRequest, CancellationToken) // Create client CloudShellServiceClient cloudShellServiceClient = await CloudShellServiceClient.CreateAsync(); // Initialize request argument(s) StartEnvironmentRequest request = new StartEnvironmentRequest { Name = "", AccessToken = "", PublicKeys = { "", }, }; // Make the request Operation <StartEnvironmentResponse, StartEnvironmentMetadata> response = await cloudShellServiceClient.StartEnvironmentAsync(request); // Poll until the returned long-running operation is complete Operation <StartEnvironmentResponse, StartEnvironmentMetadata> completedResponse = await response.PollUntilCompletedAsync(); // Retrieve the operation result StartEnvironmentResponse result = completedResponse.Result; // Or get the name of the operation string operationName = response.Name; // This name can be stored, then the long-running operation retrieved later by name Operation <StartEnvironmentResponse, StartEnvironmentMetadata> retrievedResponse = await cloudShellServiceClient.PollOnceStartEnvironmentAsync(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result StartEnvironmentResponse retrievedResult = retrievedResponse.Result; } // End snippet }