1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. apphub
  5. getDiscoveredService
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

gcp.apphub.getDiscoveredService

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 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/v7/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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:apphub/getDiscoveredService:getDiscoveredService
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Location string
    The location of the discovered service.
    ServiceUri string
    The uri of the service.
    Project string
    The host project of the discovered service.
    Location string
    The location of the discovered service.
    ServiceUri string
    The uri of the service.
    Project string
    The host project of the discovered service.
    location String
    The location of the discovered service.
    serviceUri String
    The uri of the service.
    project String
    The host project of the discovered service.
    location string
    The location of the discovered service.
    serviceUri 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.
    serviceUri 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 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.
    GcpProject 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.
    gcpProject 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.
    gcpProject 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.
    gcpProject 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

    Path string
    Additional path under the resource URI.
    Uri string
    The underlying resource URI.
    Path string
    Additional path under the resource URI.
    Uri string
    The underlying resource URI.
    path String
    Additional path under the resource URI.
    uri String
    The underlying resource URI.
    path string
    Additional path under the resource URI.
    uri string
    The underlying resource URI.
    path str
    Additional path under the resource URI.
    uri str
    The underlying resource URI.
    path String
    Additional path under the resource URI.
    uri 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.
    gcp logo
    Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi