1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. apphub
  5. getDiscoveredService
Google Cloud v8.23.0 published on Monday, Mar 24, 2025 by Pulumi

gcp.apphub.getDiscoveredService

Explore with Pulumi AI

Google Cloud v8.23.0 published on Monday, Mar 24, 2025 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",
});
Copy
import pulumi
import pulumi_gcp as gcp

my_service = gcp.apphub.get_discovered_service(location="my-location",
    service_uri="my-service-uri")
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
variables:
  my-service:
    fn::invoke:
      function: gcp:apphub:getDiscoveredService
      arguments:
        location: my-location
        serviceUri: my-service-uri
Copy

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>
Copy
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]
Copy
func GetDiscoveredService(ctx *Context, args *GetDiscoveredServiceArgs, opts ...InvokeOption) (*GetDiscoveredServiceResult, error)
func GetDiscoveredServiceOutput(ctx *Context, args *GetDiscoveredServiceOutputArgs, opts ...InvokeOption) GetDiscoveredServiceResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetDiscoveredServiceResult> getDiscoveredService(GetDiscoveredServiceArgs args, InvokeOptions options)
public static Output<GetDiscoveredServiceResult> getDiscoveredService(GetDiscoveredServiceArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: gcp:apphub/getDiscoveredService:getDiscoveredService
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Location This property is required. string
The location of the discovered service.
ServiceUri This property is required. string
The uri of the service.
Project string
The host project of the discovered service.
Location This property is required. string
The location of the discovered service.
ServiceUri This property is required. string
The uri of the service.
Project string
The host project of the discovered service.
location This property is required. String
The location of the discovered service.
serviceUri This property is required. String
The uri of the service.
project String
The host project of the discovered service.
location This property is required. string
The location of the discovered service.
serviceUri This property is required. string
The uri of the service.
project string
The host project of the discovered service.
location This property is required. str
The location of the discovered service.
service_uri This property is required. str
The uri of the service.
project str
The host project of the discovered service.
location This property is required. String
The location of the discovered service.
serviceUri This property is required. 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}".
ServiceProperties List<GetDiscoveredServiceServiceProperty>
Properties of an underlying compute resource that can comprise a Service. Structure is documented below
ServiceReferences List<GetDiscoveredServiceServiceReference>
Reference to an underlying networking resource that can comprise a Service. Structure is documented below
ServiceUri 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}".
ServiceProperties []GetDiscoveredServiceServiceProperty
Properties of an underlying compute resource that can comprise a Service. Structure is documented below
ServiceReferences []GetDiscoveredServiceServiceReference
Reference to an underlying networking resource that can comprise a Service. Structure is documented below
ServiceUri 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}".
serviceProperties List<GetDiscoveredServiceServiceProperty>
Properties of an underlying compute resource that can comprise a Service. Structure is documented below
serviceReferences List<GetDiscoveredServiceServiceReference>
Reference to an underlying networking resource that can comprise a Service. Structure is documented below
serviceUri 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}".
serviceProperties GetDiscoveredServiceServiceProperty[]
Properties of an underlying compute resource that can comprise a Service. Structure is documented below
serviceReferences GetDiscoveredServiceServiceReference[]
Reference to an underlying networking resource that can comprise a Service. Structure is documented below
serviceUri 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[GetDiscoveredServiceServiceProperty]
Properties of an underlying compute resource that can comprise a Service. Structure is documented below
service_references Sequence[GetDiscoveredServiceServiceReference]
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}".
serviceProperties List<Property Map>
Properties of an underlying compute resource that can comprise a Service. Structure is documented below
serviceReferences List<Property Map>
Reference to an underlying networking resource that can comprise a Service. Structure is documented below
serviceUri String
project String

Supporting Types

GetDiscoveredServiceServiceProperty

GcpProject This property is required. string
The service project identifier that the underlying cloud resource resides in.
Location This property is required. string
The location of the discovered service.
Zone This property is required. string
The location that the underlying resource resides in if it is zonal.
GcpProject This property is required. string
The service project identifier that the underlying cloud resource resides in.
Location This property is required. string
The location of the discovered service.
Zone This property is required. string
The location that the underlying resource resides in if it is zonal.
gcpProject This property is required. String
The service project identifier that the underlying cloud resource resides in.
location This property is required. String
The location of the discovered service.
zone This property is required. String
The location that the underlying resource resides in if it is zonal.
gcpProject This property is required. string
The service project identifier that the underlying cloud resource resides in.
location This property is required. string
The location of the discovered service.
zone This property is required. string
The location that the underlying resource resides in if it is zonal.
gcp_project This property is required. str
The service project identifier that the underlying cloud resource resides in.
location This property is required. str
The location of the discovered service.
zone This property is required. str
The location that the underlying resource resides in if it is zonal.
gcpProject This property is required. String
The service project identifier that the underlying cloud resource resides in.
location This property is required. String
The location of the discovered service.
zone This property is required. String
The location that the underlying resource resides in if it is zonal.

GetDiscoveredServiceServiceReference

Path This property is required. string
Additional path under the resource URI.
Uri This property is required. string
The underlying resource URI.
Path This property is required. string
Additional path under the resource URI.
Uri This property is required. string
The underlying resource URI.
path This property is required. String
Additional path under the resource URI.
uri This property is required. String
The underlying resource URI.
path This property is required. string
Additional path under the resource URI.
uri This property is required. string
The underlying resource URI.
path This property is required. str
Additional path under the resource URI.
uri This property is required. str
The underlying resource URI.
path This property is required. String
Additional path under the resource URI.
uri This property is required. String
The underlying resource URI.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.
Google Cloud v8.23.0 published on Monday, Mar 24, 2025 by Pulumi