1. Packages
  2. AWS
  3. API Docs
  4. servicediscovery
  5. getService
AWS v6.64.0 published on Friday, Dec 6, 2024 by Pulumi

aws.servicediscovery.getService

Explore with Pulumi AI

aws logo
AWS v6.64.0 published on Friday, Dec 6, 2024 by Pulumi

    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",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.servicediscovery.get_service(name="example",
        namespace_id="NAMESPACE_ID_VALUE")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          Function: aws:servicediscovery:getService
          Arguments:
            name: example
            namespaceId: NAMESPACE_ID_VALUE
    

    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(name: Optional[str] = None,
                    namespace_id: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None,
                    tags_all: Optional[Mapping[str, str]] = None,
                    opts: Optional[InvokeOptions] = None) -> GetServiceResult
    def get_service_output(name: Optional[pulumi.Input[str]] = None,
                    namespace_id: Optional[pulumi.Input[str]] = None,
                    tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                    tags_all: Optional[pulumi.Input[Mapping[str, 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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:servicediscovery/getService:getService
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name of the service.
    NamespaceId string
    ID of the namespace that the service belongs to.
    Tags Dictionary<string, string>
    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.
    TagsAll Dictionary<string, string>
    (Deprecated) Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: this attribute has been deprecated

    Name string
    Name of the service.
    NamespaceId string
    ID of the namespace that the service belongs to.
    Tags map[string]string
    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.
    TagsAll map[string]string
    (Deprecated) Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: this attribute has been deprecated

    name String
    Name of the service.
    namespaceId String
    ID of the namespace that the service belongs to.
    tags Map<String,String>
    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.
    tagsAll Map<String,String>
    (Deprecated) Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: this attribute has been deprecated

    name string
    Name of the service.
    namespaceId string
    ID of the namespace that the service belongs to.
    tags {[key: string]: string}
    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.
    tagsAll {[key: string]: string}
    (Deprecated) Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: this attribute has been deprecated

    name str
    Name of the service.
    namespace_id str
    ID of the namespace that the service belongs to.
    tags Mapping[str, str]
    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 Mapping[str, str]
    (Deprecated) Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: this attribute has been deprecated

    name String
    Name of the service.
    namespaceId String
    ID of the namespace that the service belongs to.
    tags Map<String>
    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.
    tagsAll Map<String>
    (Deprecated) Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: this attribute has been deprecated

    getService Result

    The following output properties are available:

    Arn string
    ARN of the service.
    Description string
    Description of the service.
    DnsConfigs List<GetServiceDnsConfig>
    Complex type that contains information about the resource record sets that you want Amazon Route 53 to create when you register an instance. See dns_config Block for details.
    HealthCheckConfigs List<GetServiceHealthCheckConfig>
    Complex type that contains settings for an optional health check. Only for Public DNS namespaces. See health_check_config Block for details.
    HealthCheckCustomConfigs List<GetServiceHealthCheckCustomConfig>
    A complex type that contains settings for ECS managed health checks. See health_check_custom_config Block for details.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    NamespaceId string
    ID of the namespace to use for DNS configuration.
    TagsAll Dictionary<string, string>
    (Deprecated) Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: this attribute has been deprecated

    Tags Dictionary<string, string>
    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.
    Arn string
    ARN of the service.
    Description string
    Description of the service.
    DnsConfigs []GetServiceDnsConfig
    Complex type that contains information about the resource record sets that you want Amazon Route 53 to create when you register an instance. See dns_config Block for details.
    HealthCheckConfigs []GetServiceHealthCheckConfig
    Complex type that contains settings for an optional health check. Only for Public DNS namespaces. See health_check_config Block for details.
    HealthCheckCustomConfigs []GetServiceHealthCheckCustomConfig
    A complex type that contains settings for ECS managed health checks. See health_check_custom_config Block for details.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    NamespaceId string
    ID of the namespace to use for DNS configuration.
    TagsAll map[string]string
    (Deprecated) Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: this attribute has been deprecated

    Tags map[string]string
    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.
    arn String
    ARN of the service.
    description String
    Description of the service.
    dnsConfigs List<GetServiceDnsConfig>
    Complex type that contains information about the resource record sets that you want Amazon Route 53 to create when you register an instance. See dns_config Block for details.
    healthCheckConfigs List<GetServiceHealthCheckConfig>
    Complex type that contains settings for an optional health check. Only for Public DNS namespaces. See health_check_config Block for details.
    healthCheckCustomConfigs List<GetServiceHealthCheckCustomConfig>
    A complex type that contains settings for ECS managed health checks. See health_check_custom_config Block for details.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    namespaceId String
    ID of the namespace to use for DNS configuration.
    tagsAll Map<String,String>
    (Deprecated) Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: this attribute has been deprecated

    tags Map<String,String>
    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.
    arn string
    ARN of the service.
    description string
    Description of the service.
    dnsConfigs GetServiceDnsConfig[]
    Complex type that contains information about the resource record sets that you want Amazon Route 53 to create when you register an instance. See dns_config Block for details.
    healthCheckConfigs GetServiceHealthCheckConfig[]
    Complex type that contains settings for an optional health check. Only for Public DNS namespaces. See health_check_config Block for details.
    healthCheckCustomConfigs GetServiceHealthCheckCustomConfig[]
    A complex type that contains settings for ECS managed health checks. See health_check_custom_config Block for details.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    namespaceId string
    ID of the namespace to use for DNS configuration.
    tagsAll {[key: string]: string}
    (Deprecated) Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: this attribute has been deprecated

    tags {[key: string]: string}
    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.
    arn str
    ARN of the service.
    description str
    Description of the service.
    dns_configs Sequence[GetServiceDnsConfig]
    Complex type that contains information about the resource record sets that you want Amazon Route 53 to create when you register an instance. See dns_config Block for details.
    health_check_configs Sequence[GetServiceHealthCheckConfig]
    Complex type that contains settings for an optional health check. Only for Public DNS namespaces. See health_check_config Block for details.
    health_check_custom_configs Sequence[GetServiceHealthCheckCustomConfig]
    A complex type that contains settings for ECS managed health checks. See health_check_custom_config Block for details.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    namespace_id str
    ID of the namespace to use for DNS configuration.
    tags_all Mapping[str, str]
    (Deprecated) Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: this attribute has been deprecated

    tags Mapping[str, str]
    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.
    arn String
    ARN of the service.
    description String
    Description of the service.
    dnsConfigs List<Property Map>
    Complex type that contains information about the resource record sets that you want Amazon Route 53 to create when you register an instance. See dns_config Block for details.
    healthCheckConfigs List<Property Map>
    Complex type that contains settings for an optional health check. Only for Public DNS namespaces. See health_check_config Block for details.
    healthCheckCustomConfigs List<Property Map>
    A complex type that contains settings for ECS managed health checks. See health_check_custom_config Block for details.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    namespaceId String
    ID of the namespace to use for DNS configuration.
    tagsAll Map<String>
    (Deprecated) Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: this attribute has been deprecated

    tags Map<String>
    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.

    Supporting Types

    GetServiceDnsConfig

    DnsRecords List<GetServiceDnsConfigDnsRecord>
    An array that contains one DnsRecord object for each resource record set. See dns_records Block for details.
    NamespaceId string
    ID of the namespace that the service belongs to.
    RoutingPolicy string
    Routing policy that you want to apply to all records that Route 53 creates when you register an instance and specify the service. Valid Values: MULTIVALUE, WEIGHTED
    DnsRecords []GetServiceDnsConfigDnsRecord
    An array that contains one DnsRecord object for each resource record set. See dns_records Block for details.
    NamespaceId string
    ID of the namespace that the service belongs to.
    RoutingPolicy string
    Routing policy that you want to apply to all records that Route 53 creates when you register an instance and specify the service. Valid Values: MULTIVALUE, WEIGHTED
    dnsRecords List<GetServiceDnsConfigDnsRecord>
    An array that contains one DnsRecord object for each resource record set. See dns_records Block for details.
    namespaceId String
    ID of the namespace that the service belongs to.
    routingPolicy String
    Routing policy that you want to apply to all records that Route 53 creates when you register an instance and specify the service. Valid Values: MULTIVALUE, WEIGHTED
    dnsRecords GetServiceDnsConfigDnsRecord[]
    An array that contains one DnsRecord object for each resource record set. See dns_records Block for details.
    namespaceId string
    ID of the namespace that the service belongs to.
    routingPolicy string
    Routing policy that you want to apply to all records that Route 53 creates when you register an instance and specify the service. Valid Values: MULTIVALUE, WEIGHTED
    dns_records Sequence[GetServiceDnsConfigDnsRecord]
    An array that contains one DnsRecord object for each resource record set. See dns_records Block for details.
    namespace_id str
    ID of the namespace that the service belongs to.
    routing_policy str
    Routing policy that you want to apply to all records that Route 53 creates when you register an instance and specify the service. Valid Values: MULTIVALUE, WEIGHTED
    dnsRecords List<Property Map>
    An array that contains one DnsRecord object for each resource record set. See dns_records Block for details.
    namespaceId String
    ID of the namespace that the service belongs to.
    routingPolicy String
    Routing policy that you want to apply to all records that Route 53 creates when you register an instance and specify the service. Valid Values: MULTIVALUE, WEIGHTED

    GetServiceDnsConfigDnsRecord

    Ttl int
    Amount of time, in seconds, that you want DNS resolvers to cache the settings for this resource record set.
    Type string
    The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP
    Ttl int
    Amount of time, in seconds, that you want DNS resolvers to cache the settings for this resource record set.
    Type string
    The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP
    ttl Integer
    Amount of time, in seconds, that you want DNS resolvers to cache the settings for this resource record set.
    type String
    The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP
    ttl number
    Amount of time, in seconds, that you want DNS resolvers to cache the settings for this resource record set.
    type string
    The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP
    ttl int
    Amount of time, in seconds, that you want DNS resolvers to cache the settings for this resource record set.
    type str
    The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP
    ttl Number
    Amount of time, in seconds, that you want DNS resolvers to cache the settings for this resource record set.
    type String
    The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP

    GetServiceHealthCheckConfig

    FailureThreshold int
    The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
    ResourcePath string
    Path that you want Route 53 to request when performing health checks. Route 53 automatically adds the DNS name for the service. If you don't specify a value, the default value is /.
    Type string
    The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP
    FailureThreshold int
    The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
    ResourcePath string
    Path that you want Route 53 to request when performing health checks. Route 53 automatically adds the DNS name for the service. If you don't specify a value, the default value is /.
    Type string
    The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP
    failureThreshold Integer
    The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
    resourcePath String
    Path that you want Route 53 to request when performing health checks. Route 53 automatically adds the DNS name for the service. If you don't specify a value, the default value is /.
    type String
    The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP
    failureThreshold number
    The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
    resourcePath string
    Path that you want Route 53 to request when performing health checks. Route 53 automatically adds the DNS name for the service. If you don't specify a value, the default value is /.
    type string
    The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP
    failure_threshold int
    The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
    resource_path str
    Path that you want Route 53 to request when performing health checks. Route 53 automatically adds the DNS name for the service. If you don't specify a value, the default value is /.
    type str
    The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP
    failureThreshold Number
    The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
    resourcePath String
    Path that you want Route 53 to request when performing health checks. Route 53 automatically adds the DNS name for the service. If you don't specify a value, the default value is /.
    type String
    The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP

    GetServiceHealthCheckCustomConfig

    FailureThreshold int
    The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
    FailureThreshold int
    The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
    failureThreshold Integer
    The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
    failureThreshold number
    The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
    failure_threshold int
    The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
    failureThreshold Number
    The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.64.0 published on Friday, Dec 6, 2024 by Pulumi