public async Task <GameServerDeployment> UpdateRolloutRemoveOverrideConfigAsync( string projectId, string deploymentId) { // Create the client. GameServerDeploymentsServiceClient client = await GameServerDeploymentsServiceClient.CreateAsync(); GameServerDeploymentRollout rollout = new GameServerDeploymentRollout { Name = GameServerDeploymentName.FormatProjectLocationDeployment(projectId, "global", deploymentId) }; UpdateGameServerDeploymentRolloutRequest request = new UpdateGameServerDeploymentRolloutRequest { Rollout = rollout, UpdateMask = new FieldMask { Paths = { "game_server_config_overrides" } } }; // Make the request. Operation <GameServerDeployment, OperationMetadata> response = await client.UpdateGameServerDeploymentRolloutAsync(request); Operation <GameServerDeployment, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); // Retrieve the operation result. return(completedResponse.Result); }
public async Task <GameServerDeployment> UpdateRolloutOverrideConfigAsync( string projectId, string deploymentId, string configId, string realmRegionId, string realmId) { // Create the client. GameServerDeploymentsServiceClient client = await GameServerDeploymentsServiceClient.CreateAsync(); GameServerConfigOverride configOverride = new GameServerConfigOverride { ConfigVersion = configId, RealmsSelector = new RealmSelector() }; configOverride.RealmsSelector.Realms.Add(RealmName.FormatProjectLocationRealm(projectId, realmRegionId, realmId)); GameServerDeploymentRollout rollout = new GameServerDeploymentRollout { Name = GameServerDeploymentName.FormatProjectLocationDeployment(projectId, "global", deploymentId) }; rollout.GameServerConfigOverrides.Add(configOverride); UpdateGameServerDeploymentRolloutRequest request = new UpdateGameServerDeploymentRolloutRequest { Rollout = rollout, UpdateMask = new FieldMask { Paths = { "game_server_config_overrides" } } }; // Make the request. Operation <GameServerDeployment, OperationMetadata> response = await client.UpdateGameServerDeploymentRolloutAsync(request); Operation <GameServerDeployment, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); // Retrieve the operation result. return(completedResponse.Result); }