1. Packages
  2. Hsdp Provider
  3. API Docs
  4. getDiscoveryService
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

hsdp.getDiscoveryService

Explore with Pulumi AI

hsdp logo
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

    Discover standard services details

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as hsdp from "@pulumi/hsdp";
    
    const myService = hsdp.getDiscoveryService({
        name: "My Service",
    });
    const anotherService = hsdp.getDiscoveryService({
        principal: {
            username: _var.device_login,
            password: _var.device_password,
            oauth2ClientId: _var.mdm_oauth2_client_id,
            oauth2Password: _var.mdm_oauth2_password,
        },
        tag: "another-service",
    });
    
    import pulumi
    import pulumi_hsdp as hsdp
    
    my_service = hsdp.get_discovery_service(name="My Service")
    another_service = hsdp.get_discovery_service(principal={
            "username": var["device_login"],
            "password": var["device_password"],
            "oauth2_client_id": var["mdm_oauth2_client_id"],
            "oauth2_password": var["mdm_oauth2_password"],
        },
        tag="another-service")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/hsdp/hsdp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := hsdp.GetDiscoveryService(ctx, &hsdp.GetDiscoveryServiceArgs{
    			Name: pulumi.StringRef("My Service"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = hsdp.GetDiscoveryService(ctx, &hsdp.GetDiscoveryServiceArgs{
    			Principal: hsdp.GetDiscoveryServicePrincipal{
    				Username:       pulumi.StringRef(_var.Device_login),
    				Password:       pulumi.StringRef(_var.Device_password),
    				Oauth2ClientId: pulumi.StringRef(_var.Mdm_oauth2_client_id),
    				Oauth2Password: pulumi.StringRef(_var.Mdm_oauth2_password),
    			},
    			Tag: pulumi.StringRef("another-service"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Hsdp = Pulumi.Hsdp;
    
    return await Deployment.RunAsync(() => 
    {
        var myService = Hsdp.GetDiscoveryService.Invoke(new()
        {
            Name = "My Service",
        });
    
        var anotherService = Hsdp.GetDiscoveryService.Invoke(new()
        {
            Principal = new Hsdp.Inputs.GetDiscoveryServicePrincipalInputArgs
            {
                Username = @var.Device_login,
                Password = @var.Device_password,
                Oauth2ClientId = @var.Mdm_oauth2_client_id,
                Oauth2Password = @var.Mdm_oauth2_password,
            },
            Tag = "another-service",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.hsdp.HsdpFunctions;
    import com.pulumi.hsdp.inputs.GetDiscoveryServiceArgs;
    import com.pulumi.hsdp.inputs.GetDiscoveryServicePrincipalArgs;
    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 = HsdpFunctions.getDiscoveryService(GetDiscoveryServiceArgs.builder()
                .name("My Service")
                .build());
    
            final var anotherService = HsdpFunctions.getDiscoveryService(GetDiscoveryServiceArgs.builder()
                .principal(GetDiscoveryServicePrincipalArgs.builder()
                    .username(var_.device_login())
                    .password(var_.device_password())
                    .oauth2ClientId(var_.mdm_oauth2_client_id())
                    .oauth2Password(var_.mdm_oauth2_password())
                    .build())
                .tag("another-service")
                .build());
    
        }
    }
    
    variables:
      myService:
        fn::invoke:
          function: hsdp:getDiscoveryService
          arguments:
            name: My Service
      anotherService:
        fn::invoke:
          function: hsdp:getDiscoveryService
          arguments:
            principal:
              username: ${var.device_login}
              password: ${var.device_password}
              oauth2ClientId: ${var.mdm_oauth2_client_id}
              oauth2Password: ${var.mdm_oauth2_password}
            tag: another-service
    

    Using getDiscoveryService

    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 getDiscoveryService(args: GetDiscoveryServiceArgs, opts?: InvokeOptions): Promise<GetDiscoveryServiceResult>
    function getDiscoveryServiceOutput(args: GetDiscoveryServiceOutputArgs, opts?: InvokeOptions): Output<GetDiscoveryServiceResult>
    def get_discovery_service(id: Optional[str] = None,
                              name: Optional[str] = None,
                              principal: Optional[GetDiscoveryServicePrincipal] = None,
                              tag: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetDiscoveryServiceResult
    def get_discovery_service_output(id: Optional[pulumi.Input[str]] = None,
                              name: Optional[pulumi.Input[str]] = None,
                              principal: Optional[pulumi.Input[GetDiscoveryServicePrincipalArgs]] = None,
                              tag: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetDiscoveryServiceResult]
    func GetDiscoveryService(ctx *Context, args *GetDiscoveryServiceArgs, opts ...InvokeOption) (*GetDiscoveryServiceResult, error)
    func GetDiscoveryServiceOutput(ctx *Context, args *GetDiscoveryServiceOutputArgs, opts ...InvokeOption) GetDiscoveryServiceResultOutput

    > Note: This function is named GetDiscoveryService in the Go SDK.

    public static class GetDiscoveryService 
    {
        public static Task<GetDiscoveryServiceResult> InvokeAsync(GetDiscoveryServiceArgs args, InvokeOptions? opts = null)
        public static Output<GetDiscoveryServiceResult> Invoke(GetDiscoveryServiceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDiscoveryServiceResult> getDiscoveryService(GetDiscoveryServiceArgs args, InvokeOptions options)
    public static Output<GetDiscoveryServiceResult> getDiscoveryService(GetDiscoveryServiceArgs args, InvokeOptions options)
    
    fn::invoke:
      function: hsdp:index/getDiscoveryService:getDiscoveryService
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The ID of the service
    Name string
    The name of the Service to discover
    Principal GetDiscoveryServicePrincipal
    Tag string

    The tag of the Service to discover

    The current version of the Discovery service only supports User and Device principals. Service identities are not supported (yet)

    Id string
    The ID of the service
    Name string
    The name of the Service to discover
    Principal GetDiscoveryServicePrincipal
    Tag string

    The tag of the Service to discover

    The current version of the Discovery service only supports User and Device principals. Service identities are not supported (yet)

    id String
    The ID of the service
    name String
    The name of the Service to discover
    principal GetDiscoveryServicePrincipal
    tag String

    The tag of the Service to discover

    The current version of the Discovery service only supports User and Device principals. Service identities are not supported (yet)

    id string
    The ID of the service
    name string
    The name of the Service to discover
    principal GetDiscoveryServicePrincipal
    tag string

    The tag of the Service to discover

    The current version of the Discovery service only supports User and Device principals. Service identities are not supported (yet)

    id str
    The ID of the service
    name str
    The name of the Service to discover
    principal GetDiscoveryServicePrincipal
    tag str

    The tag of the Service to discover

    The current version of the Discovery service only supports User and Device principals. Service identities are not supported (yet)

    id String
    The ID of the service
    name String
    The name of the Service to discover
    principal Property Map
    tag String

    The tag of the Service to discover

    The current version of the Discovery service only supports User and Device principals. Service identities are not supported (yet)

    getDiscoveryService Result

    The following output properties are available:

    Actions List<string>
    (list(string)) A list of actions supported by the service
    Id string
    The ID of the service
    IsTrusted bool
    Wether this service is a trusted one
    Name string
    Tag string
    Urls List<string>
    (list(string)) The list of URLs of this service. Ordered is significant
    Principal GetDiscoveryServicePrincipal
    Actions []string
    (list(string)) A list of actions supported by the service
    Id string
    The ID of the service
    IsTrusted bool
    Wether this service is a trusted one
    Name string
    Tag string
    Urls []string
    (list(string)) The list of URLs of this service. Ordered is significant
    Principal GetDiscoveryServicePrincipal
    actions List<String>
    (list(string)) A list of actions supported by the service
    id String
    The ID of the service
    isTrusted Boolean
    Wether this service is a trusted one
    name String
    tag String
    urls List<String>
    (list(string)) The list of URLs of this service. Ordered is significant
    principal GetDiscoveryServicePrincipal
    actions string[]
    (list(string)) A list of actions supported by the service
    id string
    The ID of the service
    isTrusted boolean
    Wether this service is a trusted one
    name string
    tag string
    urls string[]
    (list(string)) The list of URLs of this service. Ordered is significant
    principal GetDiscoveryServicePrincipal
    actions Sequence[str]
    (list(string)) A list of actions supported by the service
    id str
    The ID of the service
    is_trusted bool
    Wether this service is a trusted one
    name str
    tag str
    urls Sequence[str]
    (list(string)) The list of URLs of this service. Ordered is significant
    principal GetDiscoveryServicePrincipal
    actions List<String>
    (list(string)) A list of actions supported by the service
    id String
    The ID of the service
    isTrusted Boolean
    Wether this service is a trusted one
    name String
    tag String
    urls List<String>
    (list(string)) The list of URLs of this service. Ordered is significant
    principal Property Map

    Supporting Types

    GetDiscoveryServicePrincipal

    Endpoint string
    Environment string
    Oauth2ClientId string
    The MDM OAuth2 client ID to use for token exchange
    Oauth2Password string

    The MDM OAuth2 client password to use for token exchange

    An MDM OAuth2 client with the ?.?.dsc.service.readAny set should be used for retrieving the principal token. At the time of writing this document (September 2022) you will almost certainly require a principal block for correct operation of this data source

    Password string
    The password of the user or device
    Region string
    ServiceId string
    ServicePrivateKey string
    UaaPassword string
    UaaUsername string
    Username string
    The username of the user or device
    Endpoint string
    Environment string
    Oauth2ClientId string
    The MDM OAuth2 client ID to use for token exchange
    Oauth2Password string

    The MDM OAuth2 client password to use for token exchange

    An MDM OAuth2 client with the ?.?.dsc.service.readAny set should be used for retrieving the principal token. At the time of writing this document (September 2022) you will almost certainly require a principal block for correct operation of this data source

    Password string
    The password of the user or device
    Region string
    ServiceId string
    ServicePrivateKey string
    UaaPassword string
    UaaUsername string
    Username string
    The username of the user or device
    endpoint String
    environment String
    oauth2ClientId String
    The MDM OAuth2 client ID to use for token exchange
    oauth2Password String

    The MDM OAuth2 client password to use for token exchange

    An MDM OAuth2 client with the ?.?.dsc.service.readAny set should be used for retrieving the principal token. At the time of writing this document (September 2022) you will almost certainly require a principal block for correct operation of this data source

    password String
    The password of the user or device
    region String
    serviceId String
    servicePrivateKey String
    uaaPassword String
    uaaUsername String
    username String
    The username of the user or device
    endpoint string
    environment string
    oauth2ClientId string
    The MDM OAuth2 client ID to use for token exchange
    oauth2Password string

    The MDM OAuth2 client password to use for token exchange

    An MDM OAuth2 client with the ?.?.dsc.service.readAny set should be used for retrieving the principal token. At the time of writing this document (September 2022) you will almost certainly require a principal block for correct operation of this data source

    password string
    The password of the user or device
    region string
    serviceId string
    servicePrivateKey string
    uaaPassword string
    uaaUsername string
    username string
    The username of the user or device
    endpoint str
    environment str
    oauth2_client_id str
    The MDM OAuth2 client ID to use for token exchange
    oauth2_password str

    The MDM OAuth2 client password to use for token exchange

    An MDM OAuth2 client with the ?.?.dsc.service.readAny set should be used for retrieving the principal token. At the time of writing this document (September 2022) you will almost certainly require a principal block for correct operation of this data source

    password str
    The password of the user or device
    region str
    service_id str
    service_private_key str
    uaa_password str
    uaa_username str
    username str
    The username of the user or device
    endpoint String
    environment String
    oauth2ClientId String
    The MDM OAuth2 client ID to use for token exchange
    oauth2Password String

    The MDM OAuth2 client password to use for token exchange

    An MDM OAuth2 client with the ?.?.dsc.service.readAny set should be used for retrieving the principal token. At the time of writing this document (September 2022) you will almost certainly require a principal block for correct operation of this data source

    password String
    The password of the user or device
    region String
    serviceId String
    servicePrivateKey String
    uaaPassword String
    uaaUsername String
    username String
    The username of the user or device

    Package Details

    Repository
    hsdp philips-software/terraform-provider-hsdp
    License
    Notes
    This Pulumi package is based on the hsdp Terraform Provider.
    hsdp logo
    hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software