

# ServiceConnectServiceResource
<a name="API_ServiceConnectServiceResource"></a>

The Service Connect resource. Each configuration maps a discovery name to a Amazon Cloud Map service name. The data is stored in Amazon Cloud Map as part of the Service Connect configuration for each discovery name of this Amazon ECS service.

A task can resolve the `dnsName` for each of the `clientAliases` of a service. However a task can't resolve the discovery names. If you want to connect to a service, refer to the `ServiceConnectConfiguration` of that service for the list of `clientAliases` that you can use.

## Contents
<a name="API_ServiceConnectServiceResource_Contents"></a>

 ** discoveryArn **   <a name="ECS-Type-ServiceConnectServiceResource-discoveryArn"></a>
The Amazon Resource Name (ARN) for the service in Amazon Cloud Map that matches the discovery name for this Service Connect resource. You can use this ARN in other integrations with Amazon Cloud Map. However, Service Connect can't ensure connectivity outside of Amazon ECS.  
Type: String  
Required: No

 ** discoveryName **   <a name="ECS-Type-ServiceConnectServiceResource-discoveryName"></a>
The discovery name of this Service Connect resource.  
The `discoveryName` is the name of the new Amazon Cloud Map service that Amazon ECS creates for this Amazon ECS service. This must be unique within the Amazon Cloud Map namespace. The name can contain up to 64 characters. The name can include lowercase letters, numbers, underscores (\$1), and hyphens (-). The name can't start with a hyphen.  
If the `discoveryName` isn't specified, the port mapping name from the task definition is used in `portName.namespace`.  
Type: String  
Required: No

## See Also
<a name="API_ServiceConnectServiceResource_SeeAlso"></a>

For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/ecs-2014-11-13/ServiceConnectServiceResource) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/ecs-2014-11-13/ServiceConnectServiceResource) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/ecs-2014-11-13/ServiceConnectServiceResource) 