getProjectService

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:

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/v7/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

argument

A collection of arguments for invoking getProjectService.


suspend fun getProjectService(project: String? = null, service: String): GetProjectServiceResult

Return

A collection of values returned by getProjectService.

Parameters

project

The project in which the resource belongs. If it is not provided, the provider project is used.

service

The name of the Google Platform project service.

See also


Return

A collection of values returned by getProjectService.

Parameters

argument

Builder for com.pulumi.gcp.projects.kotlin.inputs.GetProjectServicePlainArgs.

See also