get Project Service
Verify the API service for the Google Cloud Platform project to see if it is enabled or not. For a list of services available, visit the API library page or run gcloud services list --available
. This datasource requires the Service Usage API to use. To get more information about gcp.projects.Service
, see:
How-to Guides
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const my_project_service = gcp.projects.getProjectService({
service: "my-project-service",
});
import pulumi
import pulumi_gcp as gcp
my_project_service = gcp.projects.get_project_service(service="my-project-service")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var my_project_service = Gcp.Projects.GetProjectService.Invoke(new()
{
Service = "my-project-service",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/projects"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := projects.GetProjectService(ctx, &projects.GetProjectServiceArgs{
Service: "my-project-service",
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.projects.ProjectsFunctions;
import com.pulumi.gcp.projects.inputs.GetProjectServiceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var my-project-service = ProjectsFunctions.getProjectService(GetProjectServiceArgs.builder()
.service("my-project-service")
.build());
}
}
variables:
my-project-service:
fn::invoke:
function: gcp:projects:getProjectService
arguments:
service: my-project-service
Return
A collection of values returned by getProjectService.
Parameters
A collection of arguments for invoking getProjectService.
Return
A collection of values returned by getProjectService.
Parameters
The project in which the resource belongs. If it is not provided, the provider project is used.
The name of the Google Platform project service.
See also
Return
A collection of values returned by getProjectService.
Parameters
Builder for com.pulumi.gcp.projects.kotlin.inputs.GetProjectServicePlainArgs.