Viewing docs for Google Cloud v9.16.0
published on Thursday, Mar 19, 2026 by Pulumi
published on Thursday, Mar 19, 2026 by Pulumi
Viewing docs for Google Cloud v9.16.0
published on Thursday, Mar 19, 2026 by Pulumi
published on Thursday, Mar 19, 2026 by Pulumi
Get information about a discovered service from its uri.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const my_service = gcp.apphub.getDiscoveredService({
location: "my-location",
serviceUri: "my-service-uri",
});
import pulumi
import pulumi_gcp as gcp
my_service = gcp.apphub.get_discovered_service(location="my-location",
service_uri="my-service-uri")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/apphub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apphub.GetDiscoveredService(ctx, &apphub.GetDiscoveredServiceArgs{
Location: "my-location",
ServiceUri: "my-service-uri",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var my_service = Gcp.Apphub.GetDiscoveredService.Invoke(new()
{
Location = "my-location",
ServiceUri = "my-service-uri",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.apphub.ApphubFunctions;
import com.pulumi.gcp.apphub.inputs.GetDiscoveredServiceArgs;
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-service = ApphubFunctions.getDiscoveredService(GetDiscoveredServiceArgs.builder()
.location("my-location")
.serviceUri("my-service-uri")
.build());
}
}
variables:
my-service:
fn::invoke:
function: gcp:apphub:getDiscoveredService
arguments:
location: my-location
serviceUri: my-service-uri
Using getDiscoveredService
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDiscoveredService(args: GetDiscoveredServiceArgs, opts?: InvokeOptions): Promise<GetDiscoveredServiceResult>
function getDiscoveredServiceOutput(args: GetDiscoveredServiceOutputArgs, opts?: InvokeOptions): Output<GetDiscoveredServiceResult>def get_discovered_service(location: Optional[str] = None,
project: Optional[str] = None,
service_uri: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDiscoveredServiceResult
def get_discovered_service_output(location: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
service_uri: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDiscoveredServiceResult]func GetDiscoveredService(ctx *Context, args *GetDiscoveredServiceArgs, opts ...InvokeOption) (*GetDiscoveredServiceResult, error)
func GetDiscoveredServiceOutput(ctx *Context, args *GetDiscoveredServiceOutputArgs, opts ...InvokeOption) GetDiscoveredServiceResultOutput> Note: This function is named GetDiscoveredService in the Go SDK.
public static class GetDiscoveredService
{
public static Task<GetDiscoveredServiceResult> InvokeAsync(GetDiscoveredServiceArgs args, InvokeOptions? opts = null)
public static Output<GetDiscoveredServiceResult> Invoke(GetDiscoveredServiceInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDiscoveredServiceResult> getDiscoveredService(GetDiscoveredServiceArgs args, InvokeOptions options)
public static Output<GetDiscoveredServiceResult> getDiscoveredService(GetDiscoveredServiceArgs args, InvokeOptions options)
fn::invoke:
function: gcp:apphub/getDiscoveredService:getDiscoveredService
arguments:
# arguments dictionaryThe following arguments are supported:
- Location string
- The location of the discovered service.
- Service
Uri string - The uri of the service.
- Project string
- The host project of the discovered service.
- Location string
- The location of the discovered service.
- Service
Uri string - The uri of the service.
- Project string
- The host project of the discovered service.
- location String
- The location of the discovered service.
- service
Uri String - The uri of the service.
- project String
- The host project of the discovered service.
- location string
- The location of the discovered service.
- service
Uri string - The uri of the service.
- project string
- The host project of the discovered service.
- location str
- The location of the discovered service.
- service_
uri str - The uri of the service.
- project str
- The host project of the discovered service.
- location String
- The location of the discovered service.
- service
Uri String - The uri of the service.
- project String
- The host project of the discovered service.
getDiscoveredService Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The location that the underlying resource resides in.
- Name string
- Resource name of a Service. Format: "projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}".
- Service
Properties List<GetDiscovered Service Service Property> - Properties of an underlying compute resource that can comprise a Service. Structure is documented below
- Service
References List<GetDiscovered Service Service Reference> - Reference to an underlying networking resource that can comprise a Service. Structure is documented below
- Service
Uri string - Project string
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The location that the underlying resource resides in.
- Name string
- Resource name of a Service. Format: "projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}".
- Service
Properties []GetDiscovered Service Service Property - Properties of an underlying compute resource that can comprise a Service. Structure is documented below
- Service
References []GetDiscovered Service Service Reference - Reference to an underlying networking resource that can comprise a Service. Structure is documented below
- Service
Uri string - Project string
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- The location that the underlying resource resides in.
- name String
- Resource name of a Service. Format: "projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}".
- service
Properties List<GetDiscovered Service Service Property> - Properties of an underlying compute resource that can comprise a Service. Structure is documented below
- service
References List<GetDiscovered Service Service Reference> - Reference to an underlying networking resource that can comprise a Service. Structure is documented below
- service
Uri String - project String
- id string
- The provider-assigned unique ID for this managed resource.
- location string
- The location that the underlying resource resides in.
- name string
- Resource name of a Service. Format: "projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}".
- service
Properties GetDiscovered Service Service Property[] - Properties of an underlying compute resource that can comprise a Service. Structure is documented below
- service
References GetDiscovered Service Service Reference[] - Reference to an underlying networking resource that can comprise a Service. Structure is documented below
- service
Uri string - project string
- id str
- The provider-assigned unique ID for this managed resource.
- location str
- The location that the underlying resource resides in.
- name str
- Resource name of a Service. Format: "projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}".
- service_
properties Sequence[GetDiscovered Service Service Property] - Properties of an underlying compute resource that can comprise a Service. Structure is documented below
- service_
references Sequence[GetDiscovered Service Service Reference] - Reference to an underlying networking resource that can comprise a Service. Structure is documented below
- service_
uri str - project str
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- The location that the underlying resource resides in.
- name String
- Resource name of a Service. Format: "projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}".
- service
Properties List<Property Map> - Properties of an underlying compute resource that can comprise a Service. Structure is documented below
- service
References List<Property Map> - Reference to an underlying networking resource that can comprise a Service. Structure is documented below
- service
Uri String - project String
Supporting Types
GetDiscoveredServiceServiceProperty
- Gcp
Project string - The service project identifier that the underlying cloud resource resides in.
- Location string
- The location of the discovered service.
- Zone string
- The location that the underlying resource resides in if it is zonal.
- Gcp
Project string - The service project identifier that the underlying cloud resource resides in.
- Location string
- The location of the discovered service.
- Zone string
- The location that the underlying resource resides in if it is zonal.
- gcp
Project String - The service project identifier that the underlying cloud resource resides in.
- location String
- The location of the discovered service.
- zone String
- The location that the underlying resource resides in if it is zonal.
- gcp
Project string - The service project identifier that the underlying cloud resource resides in.
- location string
- The location of the discovered service.
- zone string
- The location that the underlying resource resides in if it is zonal.
- gcp_
project str - The service project identifier that the underlying cloud resource resides in.
- location str
- The location of the discovered service.
- zone str
- The location that the underlying resource resides in if it is zonal.
- gcp
Project String - The service project identifier that the underlying cloud resource resides in.
- location String
- The location of the discovered service.
- zone String
- The location that the underlying resource resides in if it is zonal.
GetDiscoveredServiceServiceReference
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
Viewing docs for Google Cloud v9.16.0
published on Thursday, Mar 19, 2026 by Pulumi
published on Thursday, Mar 19, 2026 by Pulumi
