Update deployment

Update a Game Server deployment.

Code sample


To learn how to install and use the client library for Game Servers, see Game Servers client libraries.

def update_deployment(project_id, deployment_id):
    """Updates a game server deployment."""

    client = gaming.GameServerDeploymentsServiceClient()

    # Location is hard coded as global, as game server deployments can
    # only be created in global.  This is done for all operations on
    # game server deployments, as well as for its child resource types.
    request = game_server_deployments.UpdateGameServerDeploymentRequest(
            labels={"label-key-1": "label-value-1", "label-key-2": "label-value-2"},

    operation = client.update_game_server_deployment(request)
    print(f"Update deployment operation: {operation.operation.name}")

What's next

To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.