/// <summary>Snippet for CreateGameServerConfigAsync</summary> public async Task CreateGameServerConfigResourceNamesAsync() { // Snippet: CreateGameServerConfigAsync(GameServerDeploymentName, GameServerConfig, CallSettings) // Additional: CreateGameServerConfigAsync(GameServerDeploymentName, GameServerConfig, CancellationToken) // Create client GameServerConfigsServiceClient gameServerConfigsServiceClient = await GameServerConfigsServiceClient.CreateAsync(); // Initialize request argument(s) GameServerDeploymentName parent = GameServerDeploymentName.FromProjectLocationDeployment("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); GameServerConfig gameServerConfig = new GameServerConfig(); // Make the request Operation <GameServerConfig, OperationMetadata> response = await gameServerConfigsServiceClient.CreateGameServerConfigAsync(parent, gameServerConfig); // Poll until the returned long-running operation is complete Operation <GameServerConfig, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); // Retrieve the operation result GameServerConfig 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 <GameServerConfig, OperationMetadata> retrievedResponse = await gameServerConfigsServiceClient.PollOnceCreateGameServerConfigAsync(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result GameServerConfig retrievedResult = retrievedResponse.Result; } // End snippet }