We recommend new projects start with resources from the AWS provider.
published on Monday, Mar 23, 2026 by Pulumi
We recommend new projects start with resources from the AWS provider.
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.
- Dns
Config Pulumi.Aws Native. Service Discovery. Inputs. Service Dns Config - DNS-related configurations for the service.
- Health
Check Pulumi.Config Aws Native. Service Discovery. Inputs. Service Health Check Config - Settings for health checks. Used when routing is DNS-based.
- Health
Check Pulumi.Custom Config Aws Native. Service Discovery. Inputs. Service Health Check Custom Config - Settings for custom health checks.
- Name string
- The name of the service.
- Namespace
Id string - The ID of the namespace in which the service is created.
- Service
Attributes Dictionary<string, string> - A string map that contains attributes and values for the service. You can specify a maximum of 30 key-value pairs.
-
List<Pulumi.
Aws Native. 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.
- Dns
Config ServiceDns Config Args - DNS-related configurations for the service.
- Health
Check ServiceConfig Health Check Config Args - Settings for health checks. Used when routing is DNS-based.
- Health
Check ServiceCustom Config Health Check Custom Config Args - Settings for custom health checks.
- Name string
- The name of the service.
- Namespace
Id string - The ID of the namespace in which the service is created.
- Service
Attributes map[string]string - A string map that contains attributes and values for the service. You can specify a maximum of 30 key-value pairs.
-
Tag
Args - 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.
- dns
Config ServiceDns Config - DNS-related configurations for the service.
- health
Check ServiceConfig Health Check Config - Settings for health checks. Used when routing is DNS-based.
- health
Check ServiceCustom Config Health Check Custom Config - Settings for custom health checks.
- name String
- The name of the service.
- namespace
Id String - The ID of the namespace in which the service is created.
- service
Attributes Map<String,String> - A string map that contains attributes and values for the service. You can specify a maximum of 30 key-value pairs.
- 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.
- dns
Config ServiceDns Config - DNS-related configurations for the service.
- health
Check ServiceConfig Health Check Config - Settings for health checks. Used when routing is DNS-based.
- health
Check ServiceCustom Config Health Check Custom Config - Settings for custom health checks.
- name string
- The name of the service.
- namespace
Id string - The ID of the namespace in which the service is created.
- service
Attributes {[key: string]: string} - A string map that contains attributes and values for the service. You can specify a maximum of 30 key-value pairs.
- 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 ServiceDns Config Args - DNS-related configurations for the service.
- health_
check_ Serviceconfig Health Check Config Args - Settings for health checks. Used when routing is DNS-based.
- health_
check_ Servicecustom_ config Health Check Custom Config Args - 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.
-
Sequence[Tag
Args] - 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.
- dns
Config Property Map - DNS-related configurations for the service.
- health
Check Property MapConfig - Settings for health checks. Used when routing is DNS-based.
- health
Check Property MapCustom Config - Settings for custom health checks.
- name String
- The name of the service.
- namespace
Id String - The ID of the namespace in which the service is created.
- service
Attributes Map<String> - A string map that contains attributes and values for the service. You can specify a maximum of 30 key-value pairs.
- 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:
Supporting Types
ServiceDnsConfig, ServiceDnsConfigArgs
DNS configuration settings for the service.- Dns
Records List<Pulumi.Aws Native. Service Discovery. Inputs. Service Dns Record> - A list of DNS records associated with the service.
- Namespace
Id string - The ID of the namespace for the DNS configuration.
- Routing
Policy string - The routing policy to use for DNS queries.
- Dns
Records []ServiceDns Record - A list of DNS records associated with the service.
- Namespace
Id string - The ID of the namespace for the DNS configuration.
- Routing
Policy string - The routing policy to use for DNS queries.
- dns
Records List<ServiceDns Record> - A list of DNS records associated with the service.
- namespace
Id String - The ID of the namespace for the DNS configuration.
- routing
Policy String - The routing policy to use for DNS queries.
- dns
Records ServiceDns Record[] - A list of DNS records associated with the service.
- namespace
Id string - The ID of the namespace for the DNS configuration.
- routing
Policy string - The routing policy to use for DNS queries.
- dns_
records Sequence[ServiceDns Record] - 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.
- dns
Records List<Property Map> - A list of DNS records associated with the service.
- namespace
Id String - The ID of the namespace for the DNS configuration.
- routing
Policy String - The routing policy to use for DNS queries.
ServiceDnsRecord, ServiceDnsRecordArgs
A DNS record associated with the service.ServiceHealthCheckConfig, ServiceHealthCheckConfigArgs
Configuration for health checks for the service.- Type string
- The type of health check (e.g., HTTP, HTTPS, TCP).
- Failure
Threshold double - The number of consecutive health check failures that must occur before declaring the service unhealthy.
- Resource
Path string - The path to ping on the service for health checks.
- Type string
- The type of health check (e.g., HTTP, HTTPS, TCP).
- Failure
Threshold float64 - The number of consecutive health check failures that must occur before declaring the service unhealthy.
- Resource
Path string - The path to ping on the service for health checks.
- type String
- The type of health check (e.g., HTTP, HTTPS, TCP).
- failure
Threshold Double - The number of consecutive health check failures that must occur before declaring the service unhealthy.
- resource
Path String - The path to ping on the service for health checks.
- type string
- The type of health check (e.g., HTTP, HTTPS, TCP).
- failure
Threshold number - The number of consecutive health check failures that must occur before declaring the service unhealthy.
- resource
Path 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).
- failure
Threshold Number - The number of consecutive health check failures that must occur before declaring the service unhealthy.
- resource
Path String - The path to ping on the service for health checks.
ServiceHealthCheckCustomConfig, ServiceHealthCheckCustomConfigArgs
Configurations for custom health checks for the service.- Failure
Threshold double - The number of consecutive health check failures required before the service is considered unhealthy.
- Failure
Threshold float64 - The number of consecutive health check failures required before the service is considered unhealthy.
- failure
Threshold Double - The number of consecutive health check failures required before the service is considered unhealthy.
- failure
Threshold 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.
- failure
Threshold 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.Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.
published on Monday, Mar 23, 2026 by Pulumi
