consul/website/content/commands/services/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

58 lines
1.7 KiB
Plaintext

---
layout: commands
page_title: 'Commands: Exported Services'
description: >-
The `consul services exported-services` command lists exported services and their consumers.
---
# Consul Exported Services
Command: `consul services exported-services`
Corresponding HTTP API Endpoint: [\[GET\] /v1/exported-services](/consul/api-docs/exported-services)
The `exported-services` command displays the services that were exported using an [`exported-services` configuration entry](/consul/docs/connect/config-entries/exported-services). Sameness groups and wildcards in the configuration entry are expanded in the response.
The table below shows this command's [required ACLs](/consul/api-docs/api-structure#authentication).
| ACL Required |
| ------------------------------ |
| `mesh:read` or `operator:read` |
## Usage
Usage: `consul services exported-services [options]`
#### Command Options
- `-format={pretty|json}` - Command output format. The default value is `pretty`.
- `-filter` - Specifies an expression to use for filtering the results. `Consumers.Peers` and `Consumers.Partitions' selectors are supported.
#### Enterprise Options
@include 'cli-http-api-partition-options.mdx'
#### API Options
@include 'http_api_options_client.mdx'
## Examples
To list all exported services and consumers:
$ consul services exported-services
Service Consumer Peers
backend east, west
db west
frontend east, east-eu
web east
The following lists exported services with a filter expression:
$ consul services exported-services -filter='"west" in Consumers.Peers'
Service Consumer Peers
backend east, west
db west