public IList <JobTemplate> ListJobTemplates(string projectId, string location)
    {
        // Create the client.
        TranscoderServiceClient client = TranscoderServiceClient.Create();

        // Build the parent location name.
        LocationName parentLocation = new LocationName(projectId, location);

        // Call the API.
        PagedEnumerable <ListJobTemplatesResponse, JobTemplate> response = client.ListJobTemplates(parentLocation);

        // The returned sequence will lazily perform RPCs as it's being iterated over.
        return(response.ToList());
    }
    public IList <GameServerDeployment> ListDeployments(
        string projectId)
    {
        // Create the client.
        GameServerDeploymentsServiceClient client = GameServerDeploymentsServiceClient.Create();

        ListGameServerDeploymentsRequest request = new ListGameServerDeploymentsRequest
        {
            ParentAsLocationName = LocationName.FromProjectLocation(projectId, "global")
        };

        // Make the request.
        PagedEnumerable <ListGameServerDeploymentsResponse, GameServerDeployment> response = client.ListGameServerDeployments(request);

        // The returned sequence will lazily perform RPCs as it's being iterated over.
        return(response.ToList());
    }
    public IList <GameServerConfig> ListConfigs(
        string projectId, string regionId, string deploymentId)
    {
        // Create the client.
        GameServerConfigsServiceClient client = GameServerConfigsServiceClient.Create();

        ListGameServerConfigsRequest request = new ListGameServerConfigsRequest
        {
            ParentAsGameServerDeploymentName = GameServerDeploymentName.FromProjectLocationDeployment(projectId, regionId, deploymentId)
        };

        // Make the request.
        PagedEnumerable <ListGameServerConfigsResponse, GameServerConfig> response = client.ListGameServerConfigs(request);

        // The returned sequence will lazily perform RPCs as it's being iterated over.
        return(response.ToList());
    }
Beispiel #4
0
    public IList <Realm> ListRealms(
        string projectId, string regionId)
    {
        // Create the client.
        RealmsServiceClient client = RealmsServiceClient.Create();

        ListRealmsRequest request = new ListRealmsRequest
        {
            ParentAsLocationName = LocationName.FromProjectLocation(projectId, regionId)
        };

        // Make the request.
        PagedEnumerable <ListRealmsResponse, Realm> response = client.ListRealms(request);

        // The returned sequence will lazily perform RPCs as it's being iterated over.
        return(response.ToList());
    }
Beispiel #5
0
    public IList <GameServerCluster> ListClusters(
        string projectId, string regionId, string realmId)
    {
        // Create the client.
        GameServerClustersServiceClient client = GameServerClustersServiceClient.Create();

        ListGameServerClustersRequest request = new ListGameServerClustersRequest
        {
            ParentAsRealmName = RealmName.FromProjectLocationRealm(projectId, regionId, realmId),
            View = GameServerClusterView.Full
        };

        // Make the request.
        PagedEnumerable <ListGameServerClustersResponse, GameServerCluster> response = client.ListGameServerClusters(request);

        // You could iterate through response and write the cluster.Name and
        // cluster.ClusterState to the console to see the installed versions of Agones
        // and Kubernetes on each cluster.

        // The returned sequence will lazily perform RPCs as it's being iterated over.
        return(response.ToList());
    }