getService

Get information about a Google Cloud Run v2 Service. For more information see the official documentation and API.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const myService = gcp.cloudrunv2.getService({
name: "my-service",
location: "us-central1",
});
import pulumi
import pulumi_gcp as gcp
my_service = gcp.cloudrunv2.get_service(name="my-service",
location="us-central1")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var myService = Gcp.CloudRunV2.GetService.Invoke(new()
{
Name = "my-service",
Location = "us-central1",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudrunv2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudrunv2.LookupService(ctx, &cloudrunv2.LookupServiceArgs{
Name: "my-service",
Location: pulumi.StringRef("us-central1"),
}, 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.cloudrunv2.Cloudrunv2Functions;
import com.pulumi.gcp.cloudrunv2.inputs.GetServiceArgs;
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 myService = Cloudrunv2Functions.getService(GetServiceArgs.builder()
.name("my-service")
.location("us-central1")
.build());
}
}
variables:
myService:
fn::invoke:
Function: gcp:cloudrunv2:getService
Arguments:
name: my-service
location: us-central1

Return

A collection of values returned by getService.

Parameters

argument

A collection of arguments for invoking getService.


suspend fun getService(location: String? = null, name: String, project: String? = null): GetServiceResult

Return

A collection of values returned by getService.

Parameters

location

The location of the instance. eg us-central1

name

The name of the Cloud Run v2 Service.

project

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

See also


suspend fun getService(argument: suspend GetServicePlainArgsBuilder.() -> Unit): GetServiceResult

Return

A collection of values returned by getService.

Parameters

argument

Builder for com.pulumi.gcp.cloudrunv2.kotlin.inputs.GetServicePlainArgs.

See also