get Service
Retrieves information about a Service Discovery Service.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = aws.servicediscovery.getService({
name: "example",
namespaceId: "NAMESPACE_ID_VALUE",
});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
test = aws.servicediscovery.get_service(name="example",
namespace_id="NAMESPACE_ID_VALUE")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = Aws.ServiceDiscovery.GetService.Invoke(new()
{
Name = "example",
NamespaceId = "NAMESPACE_ID_VALUE",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/servicediscovery"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := servicediscovery.LookupService(ctx, &servicediscovery.LookupServiceArgs{
Name: "example",
NamespaceId: "NAMESPACE_ID_VALUE",
}, nil)
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.servicediscovery.ServicediscoveryFunctions;
import com.pulumi.aws.servicediscovery.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) {
final var test = ServicediscoveryFunctions.getService(GetServiceArgs.builder()
.name("example")
.namespaceId("NAMESPACE_ID_VALUE")
.build());
}
}
Content copied to clipboard
variables:
test:
fn::invoke:
function: aws:servicediscovery:getService
arguments:
name: example
namespaceId: NAMESPACE_ID_VALUE
Content copied to clipboard
Return
A collection of values returned by getService.
Parameters
argument
A collection of arguments for invoking getService.
suspend fun getService(name: String, namespaceId: String, tags: Map<String, String>? = null, tagsAll: Map<String, String>? = null): GetServiceResult
Return
A collection of values returned by getService.
Parameters
name
Name of the service.
namespace Id
ID of the namespace that the service belongs to.
tags
Map of tags to assign to the service. If configured with a provider default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags All
(Deprecated) Map of tags assigned to the resource, including those inherited from the provider default_tags
configuration block.
See also
Return
A collection of values returned by getService.
Parameters
argument
Builder for com.pulumi.aws.servicediscovery.kotlin.inputs.GetServicePlainArgs.