1. Packages
  2. Strata Cloud Manager Provider
  3. API Docs
  4. getService
Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi
scm logo
Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi

    Service data source

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scm from "@pulumi/scm";
    
    // Data source to look up a single service by its ID.
    const scmServiceTcpDs = scm.getService({
        id: "ff135641-6735-4d7d-85c6-3401bba9dee8",
    });
    export const serviceDetailsTcp = scmServiceTcpDs;
    // Data source to look up a single service by its ID.
    const scmServiceUdpDs = scm.getService({
        id: "e087b703-aede-437e-853e-b11576f6dcbe",
    });
    export const serviceDetailsUdp = scmServiceUdpDs;
    
    import pulumi
    import pulumi_scm as scm
    
    # Data source to look up a single service by its ID.
    scm_service_tcp_ds = scm.get_service(id="ff135641-6735-4d7d-85c6-3401bba9dee8")
    pulumi.export("serviceDetailsTcp", scm_service_tcp_ds)
    # Data source to look up a single service by its ID.
    scm_service_udp_ds = scm.get_service(id="e087b703-aede-437e-853e-b11576f6dcbe")
    pulumi.export("serviceDetailsUdp", scm_service_udp_ds)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-scm/sdk/go/scm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Data source to look up a single service by its ID.
    		scmServiceTcpDs, err := scm.LookupService(ctx, &scm.LookupServiceArgs{
    			Id: "ff135641-6735-4d7d-85c6-3401bba9dee8",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("serviceDetailsTcp", scmServiceTcpDs)
    		// Data source to look up a single service by its ID.
    		scmServiceUdpDs, err := scm.LookupService(ctx, &scm.LookupServiceArgs{
    			Id: "e087b703-aede-437e-853e-b11576f6dcbe",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("serviceDetailsUdp", scmServiceUdpDs)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scm = Pulumi.Scm;
    
    return await Deployment.RunAsync(() => 
    {
        // Data source to look up a single service by its ID.
        var scmServiceTcpDs = Scm.GetService.Invoke(new()
        {
            Id = "ff135641-6735-4d7d-85c6-3401bba9dee8",
        });
    
        // Data source to look up a single service by its ID.
        var scmServiceUdpDs = Scm.GetService.Invoke(new()
        {
            Id = "e087b703-aede-437e-853e-b11576f6dcbe",
        });
    
        return new Dictionary<string, object?>
        {
            ["serviceDetailsTcp"] = scmServiceTcpDs,
            ["serviceDetailsUdp"] = scmServiceUdpDs,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scm.ScmFunctions;
    import com.pulumi.scm.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) {
            // Data source to look up a single service by its ID.
            final var scmServiceTcpDs = ScmFunctions.getService(GetServiceArgs.builder()
                .id("ff135641-6735-4d7d-85c6-3401bba9dee8")
                .build());
    
            ctx.export("serviceDetailsTcp", scmServiceTcpDs);
            // Data source to look up a single service by its ID.
            final var scmServiceUdpDs = ScmFunctions.getService(GetServiceArgs.builder()
                .id("e087b703-aede-437e-853e-b11576f6dcbe")
                .build());
    
            ctx.export("serviceDetailsUdp", scmServiceUdpDs);
        }
    }
    
    variables:
      # Data source to look up a single service by its ID.
      scmServiceTcpDs:
        fn::invoke:
          function: scm:getService
          arguments:
            id: ff135641-6735-4d7d-85c6-3401bba9dee8
      # Data source to look up a single service by its ID.
      scmServiceUdpDs:
        fn::invoke:
          function: scm:getService
          arguments:
            id: e087b703-aede-437e-853e-b11576f6dcbe
    outputs:
      # Output the details of the looked-up service.
      serviceDetailsTcp: ${scmServiceTcpDs}
      # Output the details of the looked-up service.
      serviceDetailsUdp: ${scmServiceUdpDs}
    

    Using getService

    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 getService(args: GetServiceArgs, opts?: InvokeOptions): Promise<GetServiceResult>
    function getServiceOutput(args: GetServiceOutputArgs, opts?: InvokeOptions): Output<GetServiceResult>
    def get_service(id: Optional[str] = None,
                    name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetServiceResult
    def get_service_output(id: Optional[pulumi.Input[str]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetServiceResult]
    func LookupService(ctx *Context, args *LookupServiceArgs, opts ...InvokeOption) (*LookupServiceResult, error)
    func LookupServiceOutput(ctx *Context, args *LookupServiceOutputArgs, opts ...InvokeOption) LookupServiceResultOutput

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

    public static class GetService 
    {
        public static Task<GetServiceResult> InvokeAsync(GetServiceArgs args, InvokeOptions? opts = null)
        public static Output<GetServiceResult> Invoke(GetServiceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetServiceResult> getService(GetServiceArgs args, InvokeOptions options)
    public static Output<GetServiceResult> getService(GetServiceArgs args, InvokeOptions options)
    
    fn::invoke:
      function: scm:index/getService:getService
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The UUID of the service
    Name string
    The name of the service
    Id string
    The UUID of the service
    Name string
    The name of the service
    id String
    The UUID of the service
    name String
    The name of the service
    id string
    The UUID of the service
    name string
    The name of the service
    id str
    The UUID of the service
    name str
    The name of the service
    id String
    The UUID of the service
    name String
    The name of the service

    getService Result

    The following output properties are available:

    Description string
    Description
    Device string
    The device in which the resource is defined
    Folder string
    The folder in which the resource is defined
    Id string
    The UUID of the service
    Name string
    The name of the service
    Protocol GetServiceProtocol
    Protocol
    Snippet string
    The snippet in which the resource is defined
    Tags List<string>
    Tags for service object
    Tfid string
    Description string
    Description
    Device string
    The device in which the resource is defined
    Folder string
    The folder in which the resource is defined
    Id string
    The UUID of the service
    Name string
    The name of the service
    Protocol GetServiceProtocol
    Protocol
    Snippet string
    The snippet in which the resource is defined
    Tags []string
    Tags for service object
    Tfid string
    description String
    Description
    device String
    The device in which the resource is defined
    folder String
    The folder in which the resource is defined
    id String
    The UUID of the service
    name String
    The name of the service
    protocol GetServiceProtocol
    Protocol
    snippet String
    The snippet in which the resource is defined
    tags List<String>
    Tags for service object
    tfid String
    description string
    Description
    device string
    The device in which the resource is defined
    folder string
    The folder in which the resource is defined
    id string
    The UUID of the service
    name string
    The name of the service
    protocol GetServiceProtocol
    Protocol
    snippet string
    The snippet in which the resource is defined
    tags string[]
    Tags for service object
    tfid string
    description str
    Description
    device str
    The device in which the resource is defined
    folder str
    The folder in which the resource is defined
    id str
    The UUID of the service
    name str
    The name of the service
    protocol GetServiceProtocol
    Protocol
    snippet str
    The snippet in which the resource is defined
    tags Sequence[str]
    Tags for service object
    tfid str
    description String
    Description
    device String
    The device in which the resource is defined
    folder String
    The folder in which the resource is defined
    id String
    The UUID of the service
    name String
    The name of the service
    protocol Property Map
    Protocol
    snippet String
    The snippet in which the resource is defined
    tags List<String>
    Tags for service object
    tfid String

    Supporting Types

    GetServiceProtocol

    GetServiceProtocolTcp

    Override GetServiceProtocolTcpOverride
    Override
    Port string
    Port
    SourcePort string
    Source port
    Override GetServiceProtocolTcpOverride
    Override
    Port string
    Port
    SourcePort string
    Source port
    override GetServiceProtocolTcpOverride
    Override
    port String
    Port
    sourcePort String
    Source port
    override GetServiceProtocolTcpOverride
    Override
    port string
    Port
    sourcePort string
    Source port
    override Property Map
    Override
    port String
    Port
    sourcePort String
    Source port

    GetServiceProtocolTcpOverride

    HalfcloseTimeout int
    tcp session half-close timeout value (in second)
    Timeout int
    tcp session timeout value (in second)
    TimewaitTimeout int
    tcp session time-wait timeout value (in second)
    HalfcloseTimeout int
    tcp session half-close timeout value (in second)
    Timeout int
    tcp session timeout value (in second)
    TimewaitTimeout int
    tcp session time-wait timeout value (in second)
    halfcloseTimeout Integer
    tcp session half-close timeout value (in second)
    timeout Integer
    tcp session timeout value (in second)
    timewaitTimeout Integer
    tcp session time-wait timeout value (in second)
    halfcloseTimeout number
    tcp session half-close timeout value (in second)
    timeout number
    tcp session timeout value (in second)
    timewaitTimeout number
    tcp session time-wait timeout value (in second)
    halfclose_timeout int
    tcp session half-close timeout value (in second)
    timeout int
    tcp session timeout value (in second)
    timewait_timeout int
    tcp session time-wait timeout value (in second)
    halfcloseTimeout Number
    tcp session half-close timeout value (in second)
    timeout Number
    tcp session timeout value (in second)
    timewaitTimeout Number
    tcp session time-wait timeout value (in second)

    GetServiceProtocolUdp

    Override GetServiceProtocolUdpOverride
    Override
    Port string
    Port
    SourcePort string
    Source port
    Override GetServiceProtocolUdpOverride
    Override
    Port string
    Port
    SourcePort string
    Source port
    override GetServiceProtocolUdpOverride
    Override
    port String
    Port
    sourcePort String
    Source port
    override GetServiceProtocolUdpOverride
    Override
    port string
    Port
    sourcePort string
    Source port
    override Property Map
    Override
    port String
    Port
    sourcePort String
    Source port

    GetServiceProtocolUdpOverride

    Timeout int
    udp session timeout value (in second)
    Timeout int
    udp session timeout value (in second)
    timeout Integer
    udp session timeout value (in second)
    timeout number
    udp session timeout value (in second)
    timeout int
    udp session timeout value (in second)
    timeout Number
    udp session timeout value (in second)

    Package Details

    Repository
    scm pulumi/pulumi-scm
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scm Terraform Provider.
    scm logo
    Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate