1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. servicediscovery
  5. getService

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.58.0
published on Monday, Mar 23, 2026 by Pulumi
aws-native logo

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.58.0
published on Monday, Mar 23, 2026 by Pulumi

    Resource Type definition for AWS::ServiceDiscovery::Service

    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,
                    opts: Optional[InvokeOptions] = None) -> GetServiceResult
    def get_service_output(id: 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: aws-native:servicediscovery:getService
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The unique identifier for the service.
    Id string
    The unique identifier for the service.
    id String
    The unique identifier for the service.
    id string
    The unique identifier for the service.
    id str
    The unique identifier for the service.
    id String
    The unique identifier for the service.

    getService Result

    The following output properties are available:

    Arn string
    The Amazon Resource Name (ARN) of the service.
    Description string
    A description for the service.
    DnsConfig Pulumi.AwsNative.ServiceDiscovery.Outputs.ServiceDnsConfig
    DNS-related configurations for the service.
    HealthCheckConfig Pulumi.AwsNative.ServiceDiscovery.Outputs.ServiceHealthCheckConfig
    Settings for health checks. Used when routing is DNS-based.
    Id string
    The unique identifier for the service.
    ServiceAttributes Dictionary<string, string>
    A string map that contains attributes and values for the service. You can specify a maximum of 30 key-value pairs.
    Tags List<Pulumi.AwsNative.Outputs.Tag>
    An array of key-value pairs to associate with the service.
    Arn string
    The Amazon Resource Name (ARN) of the service.
    Description string
    A description for the service.
    DnsConfig ServiceDnsConfig
    DNS-related configurations for the service.
    HealthCheckConfig ServiceHealthCheckConfig
    Settings for health checks. Used when routing is DNS-based.
    Id string
    The unique identifier for the service.
    ServiceAttributes map[string]string
    A string map that contains attributes and values for the service. You can specify a maximum of 30 key-value pairs.
    Tags Tag
    An array of key-value pairs to associate with the service.
    arn String
    The Amazon Resource Name (ARN) of the service.
    description String
    A description for the service.
    dnsConfig ServiceDnsConfig
    DNS-related configurations for the service.
    healthCheckConfig ServiceHealthCheckConfig
    Settings for health checks. Used when routing is DNS-based.
    id String
    The unique identifier for the service.
    serviceAttributes Map<String,String>
    A string map that contains attributes and values for the service. You can specify a maximum of 30 key-value pairs.
    tags List<Tag>
    An array of key-value pairs to associate with the service.
    arn string
    The Amazon Resource Name (ARN) of the service.
    description string
    A description for the service.
    dnsConfig ServiceDnsConfig
    DNS-related configurations for the service.
    healthCheckConfig ServiceHealthCheckConfig
    Settings for health checks. Used when routing is DNS-based.
    id string
    The unique identifier for the service.
    serviceAttributes {[key: string]: string}
    A string map that contains attributes and values for the service. You can specify a maximum of 30 key-value pairs.
    tags Tag[]
    An array of key-value pairs to associate with the service.
    arn str
    The Amazon Resource Name (ARN) of the service.
    description str
    A description for the service.
    dns_config ServiceDnsConfig
    DNS-related configurations for the service.
    health_check_config ServiceHealthCheckConfig
    Settings for health checks. Used when routing is DNS-based.
    id str
    The unique identifier for the service.
    service_attributes Mapping[str, str]
    A string map that contains attributes and values for the service. You can specify a maximum of 30 key-value pairs.
    tags Sequence[root_Tag]
    An array of key-value pairs to associate with the service.
    arn String
    The Amazon Resource Name (ARN) of the service.
    description String
    A description for the service.
    dnsConfig Property Map
    DNS-related configurations for the service.
    healthCheckConfig Property Map
    Settings for health checks. Used when routing is DNS-based.
    id String
    The unique identifier for the service.
    serviceAttributes Map<String>
    A string map that contains attributes and values for the service. You can specify a maximum of 30 key-value pairs.
    tags List<Property Map>
    An array of key-value pairs to associate with the service.

    Supporting Types

    ServiceDnsConfig

    DnsRecords List<Pulumi.AwsNative.ServiceDiscovery.Inputs.ServiceDnsRecord>
    A list of DNS records associated with the service.
    NamespaceId string
    The ID of the namespace for the DNS configuration.
    RoutingPolicy string
    The routing policy to use for DNS queries.
    DnsRecords []ServiceDnsRecord
    A list of DNS records associated with the service.
    NamespaceId string
    The ID of the namespace for the DNS configuration.
    RoutingPolicy string
    The routing policy to use for DNS queries.
    dnsRecords List<ServiceDnsRecord>
    A list of DNS records associated with the service.
    namespaceId String
    The ID of the namespace for the DNS configuration.
    routingPolicy String
    The routing policy to use for DNS queries.
    dnsRecords ServiceDnsRecord[]
    A list of DNS records associated with the service.
    namespaceId string
    The ID of the namespace for the DNS configuration.
    routingPolicy string
    The routing policy to use for DNS queries.
    dns_records Sequence[ServiceDnsRecord]
    A list of DNS records associated with the service.
    namespace_id str
    The ID of the namespace for the DNS configuration.
    routing_policy str
    The routing policy to use for DNS queries.
    dnsRecords List<Property Map>
    A list of DNS records associated with the service.
    namespaceId String
    The ID of the namespace for the DNS configuration.
    routingPolicy String
    The routing policy to use for DNS queries.

    ServiceDnsRecord

    Ttl double
    The time-to-live (TTL) for the DNS record.
    Type string
    The DNS record type (e.g., A, AAAA, SRV).
    Ttl float64
    The time-to-live (TTL) for the DNS record.
    Type string
    The DNS record type (e.g., A, AAAA, SRV).
    ttl Double
    The time-to-live (TTL) for the DNS record.
    type String
    The DNS record type (e.g., A, AAAA, SRV).
    ttl number
    The time-to-live (TTL) for the DNS record.
    type string
    The DNS record type (e.g., A, AAAA, SRV).
    ttl float
    The time-to-live (TTL) for the DNS record.
    type str
    The DNS record type (e.g., A, AAAA, SRV).
    ttl Number
    The time-to-live (TTL) for the DNS record.
    type String
    The DNS record type (e.g., A, AAAA, SRV).

    ServiceHealthCheckConfig

    Type string
    The type of health check (e.g., HTTP, HTTPS, TCP).
    FailureThreshold double
    The number of consecutive health check failures that must occur before declaring the service unhealthy.
    ResourcePath string
    The path to ping on the service for health checks.
    Type string
    The type of health check (e.g., HTTP, HTTPS, TCP).
    FailureThreshold float64
    The number of consecutive health check failures that must occur before declaring the service unhealthy.
    ResourcePath string
    The path to ping on the service for health checks.
    type String
    The type of health check (e.g., HTTP, HTTPS, TCP).
    failureThreshold Double
    The number of consecutive health check failures that must occur before declaring the service unhealthy.
    resourcePath String
    The path to ping on the service for health checks.
    type string
    The type of health check (e.g., HTTP, HTTPS, TCP).
    failureThreshold number
    The number of consecutive health check failures that must occur before declaring the service unhealthy.
    resourcePath string
    The path to ping on the service for health checks.
    type str
    The type of health check (e.g., HTTP, HTTPS, TCP).
    failure_threshold float
    The number of consecutive health check failures that must occur before declaring the service unhealthy.
    resource_path str
    The path to ping on the service for health checks.
    type String
    The type of health check (e.g., HTTP, HTTPS, TCP).
    failureThreshold Number
    The number of consecutive health check failures that must occur before declaring the service unhealthy.
    resourcePath String
    The path to ping on the service for health checks.

    Tag

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    Viewing docs for AWS Cloud Control v1.58.0
    published on Monday, Mar 23, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.