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

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

    Create Service Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Service(name: string, args?: ServiceArgs, opts?: CustomResourceOptions);
    @overload
    def Service(resource_name: str,
                args: Optional[ServiceArgs] = None,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Service(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                description: Optional[str] = None,
                dns_config: Optional[ServiceDnsConfigArgs] = None,
                health_check_config: Optional[ServiceHealthCheckConfigArgs] = None,
                health_check_custom_config: Optional[ServiceHealthCheckCustomConfigArgs] = None,
                name: Optional[str] = None,
                namespace_id: Optional[str] = None,
                service_attributes: Optional[Mapping[str, str]] = None,
                tags: Optional[Sequence[_root_inputs.TagArgs]] = None,
                type: Optional[str] = None)
    func NewService(ctx *Context, name string, args *ServiceArgs, opts ...ResourceOption) (*Service, error)
    public Service(string name, ServiceArgs? args = null, CustomResourceOptions? opts = null)
    public Service(String name, ServiceArgs args)
    public Service(String name, ServiceArgs args, CustomResourceOptions options)
    
    type: aws-native:servicediscovery:Service
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Service Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Service resource accepts the following input properties:

    Description string
    A description for the service.
    DnsConfig Pulumi.AwsNative.ServiceDiscovery.Inputs.ServiceDnsConfig
    DNS-related configurations for the service.
    HealthCheckConfig Pulumi.AwsNative.ServiceDiscovery.Inputs.ServiceHealthCheckConfig
    Settings for health checks. Used when routing is DNS-based.
    HealthCheckCustomConfig Pulumi.AwsNative.ServiceDiscovery.Inputs.ServiceHealthCheckCustomConfig
    Settings for custom health checks.
    Name string
    The name of the service.
    NamespaceId string
    The ID of the namespace in which the service is created.
    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.Inputs.Tag>
    An array of key-value pairs to associate with the service.
    Type string
    The type of service. Supported values are HTTP or DNS.
    Description string
    A description for the service.
    DnsConfig ServiceDnsConfigArgs
    DNS-related configurations for the service.
    HealthCheckConfig ServiceHealthCheckConfigArgs
    Settings for health checks. Used when routing is DNS-based.
    HealthCheckCustomConfig ServiceHealthCheckCustomConfigArgs
    Settings for custom health checks.
    Name string
    The name of the service.
    NamespaceId string
    The ID of the namespace in which the service is created.
    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 TagArgs
    An array of key-value pairs to associate with the service.
    Type string
    The type of service. Supported values are HTTP or DNS.
    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.
    healthCheckCustomConfig ServiceHealthCheckCustomConfig
    Settings for custom health checks.
    name String
    The name of the service.
    namespaceId String
    The ID of the namespace in which the service is created.
    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.
    type String
    The type of service. Supported values are HTTP or DNS.
    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.
    healthCheckCustomConfig ServiceHealthCheckCustomConfig
    Settings for custom health checks.
    name string
    The name of the service.
    namespaceId string
    The ID of the namespace in which the service is created.
    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.
    type string
    The type of service. Supported values are HTTP or DNS.
    description str
    A description for the service.
    dns_config ServiceDnsConfigArgs
    DNS-related configurations for the service.
    health_check_config ServiceHealthCheckConfigArgs
    Settings for health checks. Used when routing is DNS-based.
    health_check_custom_config ServiceHealthCheckCustomConfigArgs
    Settings for custom health checks.
    name str
    The name of the service.
    namespace_id str
    The ID of the namespace in which the service is created.
    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[TagArgs]
    An array of key-value pairs to associate with the service.
    type str
    The type of service. Supported values are HTTP or DNS.
    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.
    healthCheckCustomConfig Property Map
    Settings for custom health checks.
    name String
    The name of the service.
    namespaceId String
    The ID of the namespace in which the service is created.
    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.
    type String
    The type of service. Supported values are HTTP or DNS.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Service resource produces the following output properties:

    Arn string
    The Amazon Resource Name (ARN) of the service.
    AwsId string
    The unique identifier for the service.
    Id string
    The provider-assigned unique ID for this managed resource.
    Arn string
    The Amazon Resource Name (ARN) of the service.
    AwsId string
    The unique identifier for the service.
    Id string
    The provider-assigned unique ID for this managed resource.
    arn String
    The Amazon Resource Name (ARN) of the service.
    awsId String
    The unique identifier for the service.
    id String
    The provider-assigned unique ID for this managed resource.
    arn string
    The Amazon Resource Name (ARN) of the service.
    awsId string
    The unique identifier for the service.
    id string
    The provider-assigned unique ID for this managed resource.
    arn str
    The Amazon Resource Name (ARN) of the service.
    aws_id str
    The unique identifier for the service.
    id str
    The provider-assigned unique ID for this managed resource.
    arn String
    The Amazon Resource Name (ARN) of the service.
    awsId String
    The unique identifier for the service.
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    ServiceDnsConfig, ServiceDnsConfigArgs

    DNS configuration settings for the service.
    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, ServiceDnsRecordArgs

    A DNS record associated with the service.
    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, ServiceHealthCheckConfigArgs

    Configuration for health checks for the service.
    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.

    ServiceHealthCheckCustomConfig, ServiceHealthCheckCustomConfigArgs

    Configurations for custom health checks for the service.
    FailureThreshold double
    The number of consecutive health check failures required before the service is considered unhealthy.
    FailureThreshold float64
    The number of consecutive health check failures required before the service is considered unhealthy.
    failureThreshold Double
    The number of consecutive health check failures required before the service is considered unhealthy.
    failureThreshold number
    The number of consecutive health check failures required before the service is considered unhealthy.
    failure_threshold float
    The number of consecutive health check failures required before the service is considered unhealthy.
    failureThreshold Number
    The number of consecutive health check failures required before the service is considered unhealthy.

    Tag, TagArgs

    A set of tags to apply to the resource.
    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.