consul/website/content/commands/peering/exported-services.mdx
Aimee Ukasick 654528ca60
DOCS: CE-556 Add partition parameter to API endpoint docs (#21374)
* CD-556 rename partition partial that's only used in CLI

Update CLI pages for partial rename

API: Add partial for partition as body option
API: Add partial for partition as query parameter

Update API peering and members pages

* acl/auth-methods.mdx

Update partition partials to be generic

* binding-rules.mdx, policies.mdx

* roles.mdx, templated-policies.mdx

* tokens.mdx, catalog.mdx, config.mdx, intentions.mdx

* service.mdx, exported-services.mdx, kv.mdx, namespaces.mdx

* Apply suggestions from code review

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>

* Add partial to acl/auth-methods.mdx

Fix headings indent in a few files.

* Update website/content/api-docs/acl/auth-methods.mdx

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>

---------

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
2024-07-18 12:02:45 -05:00

51 lines
1.4 KiB
Plaintext

---
layout: commands
page_title: 'Commands: Peering Exported Services'
description: |
The `consul peering exported-services` command outputs a list of services exported to a cluster peer.
---
# Consul Peering Exported Services
Command: `consul peering exported-services`
Corresponding HTTP API Endpoint: [\[GET\] /v1/peering/:name](/consul/api-docs/peering#read-a-peering-connection)
The `peering exported-services` command displays all of the services that were exported to the cluster peer using an [`exported-services` configuration entry](/consul/docs/connect/config-entries/exported-services).
The table below shows this command's [required ACLs](/consul/api-docs/api-structure#authentication).
| ACL Required |
| ------------ |
| `peering:read` |
## Usage
Usage: `consul peering exported-services [options] -name <peer name>`
#### Command Options
- `-name=<string>` - (Required) The name of the peer associated with a connection.
- `-format={pretty|json}` - Command output format. The default value is `pretty`.
#### Enterprise Options
@include 'cli-http-api-partition-options.mdx'
#### API Options
@include 'http_api_options_client.mdx'
## Examples
The following example outputs the exported services to a peering connection locally referred to as "cluster-02":
```shell-session hideClipboard
$ consul peering exported-services -name cluster-02
backend
frontend
web
```