/// <summary>Snippet for GetEnvironmentAsync</summary> public async Task GetEnvironmentAsync() { // Snippet: GetEnvironmentAsync(string, CallSettings) // Additional: GetEnvironmentAsync(string, CancellationToken) // Create client CloudShellServiceClient cloudShellServiceClient = await CloudShellServiceClient.CreateAsync(); // Initialize request argument(s) string name = "users/[USER]/environments/[ENVIRONMENT]"; // Make the request Environment response = await cloudShellServiceClient.GetEnvironmentAsync(name); // End snippet }
/// <summary>Snippet for GetEnvironmentAsync</summary> public async Task GetEnvironmentResourceNamesAsync() { // Snippet: GetEnvironmentAsync(EnvironmentName, CallSettings) // Additional: GetEnvironmentAsync(EnvironmentName, CancellationToken) // Create client CloudShellServiceClient cloudShellServiceClient = await CloudShellServiceClient.CreateAsync(); // Initialize request argument(s) EnvironmentName name = EnvironmentName.FromUserEnvironment("[USER]", "[ENVIRONMENT]"); // Make the request Environment response = await cloudShellServiceClient.GetEnvironmentAsync(name); // End snippet }