Module types/output
APIs
- AclRoleServiceIdentity
- CatalogEntryService
- GetAclRolePolicy
- GetAclRoleServiceIdentity
- GetAclTokenPolicy
- GetAutopilotHealthServer
- GetCatalogNodesNode
- GetCatalogNodesQueryOption
- GetCatalogServiceQueryOption
- GetCatalogServiceService
- GetCatalogServicesQueryOption
- GetKeyPrefixSubkeyCollection
- GetKeysKey
- GetNetworkAreaMembersMember
- GetNodesNode
- GetNodesQueryOption
- GetServiceHealthResult
- GetServiceHealthResultCheck
- GetServiceHealthResultNode
- GetServiceHealthResultService
- GetServiceQueryOption
- GetServiceService
- GetServicesQueryOption
- KeyPrefixSubkeyCollection
- KeysKey
- PreparedQueryDns
- PreparedQueryFailover
- PreparedQueryTemplate
- ServiceCheck
- ServiceCheckHeader
APIs
interface AclRoleServiceIdentity
interface AclRoleServiceIdentityproperty datacenters
datacenters?: string[];The datacenters the effective policy is valid within.
property serviceName
serviceName: string;The name of the service.
interface CatalogEntryService
interface CatalogEntryServiceproperty address
address?: undefined | string;The address of the service. Defaults to the node address.
property id
id: string;The ID of the service. Defaults to the name.
property name
name: string;The name of the service
property port
port?: undefined | number;The port of the service.
property tags
tags?: string[];A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.
interface GetAclRolePolicy
interface GetAclRolePolicyproperty id
id: string;property name
name: string;The name of the ACL Role.
interface GetAclRoleServiceIdentity
interface GetAclRoleServiceIdentityproperty datacenters
datacenters?: string[];property serviceName
serviceName?: undefined | string;interface GetAclTokenPolicy
interface GetAclTokenPolicyproperty id
id: string;property name
name: string;interface GetAutopilotHealthServer
interface GetAutopilotHealthServerproperty address
address: string;The address of the server
property healthy
healthy: boolean;Whether the server is healthy according to the current Autopilot configuration
property id
id: string;The Raft ID of the server
property lastContact
lastContact: string;The time elapsed since the server’s last contact with the leader
property lastIndex
lastIndex: number;The index of the server’s last committed Raft log entry
property lastTerm
lastTerm: number;The server’s last known Raft leader term
property leader
leader: boolean;Whether the server is currently leader
property name
name: string;The node name of the server
property serfStatus
serfStatus: string;The status of the SerfHealth check of the server
property stableSince
stableSince: string;The time this server has been in its current Healthy
state
property version
version: string;The Consul version of the server
property voter
voter: boolean;Whether the server is a voting member of the Raft cluster
interface GetCatalogNodesNode
interface GetCatalogNodesNodeproperty address
address: string;property id
id: string;property meta
meta: {[key: string]: string};property name
name: string;property taggedAddresses
taggedAddresses: {[key: string]: string};interface GetCatalogNodesQueryOption
interface GetCatalogNodesQueryOptionproperty allowStale
allowStale?: undefined | false | true;property datacenter
datacenter?: undefined | string;property near
near?: undefined | string;property nodeMeta
nodeMeta?: undefined | {[key: string]: string};property requireConsistent
requireConsistent?: undefined | false | true;property token
token?: undefined | string;property waitIndex
waitIndex?: undefined | number;property waitTime
waitTime?: undefined | string;interface GetCatalogServiceQueryOption
interface GetCatalogServiceQueryOptionproperty allowStale
allowStale?: undefined | false | true;property datacenter
datacenter?: undefined | string;property namespace
namespace?: undefined | string;property near
near?: undefined | string;property nodeMeta
nodeMeta?: undefined | {[key: string]: string};property requireConsistent
requireConsistent?: undefined | false | true;property token
token?: undefined | string;property waitIndex
waitIndex?: undefined | number;property waitTime
waitTime?: undefined | string;interface GetCatalogServiceService
interface GetCatalogServiceServiceproperty address
address: string;property createIndex
createIndex: string;property enableTagOverride
enableTagOverride: string;property id
id: string;property meta
meta: {[key: string]: string};property modifyIndex
modifyIndex: string;property name
name: string;property nodeAddress
nodeAddress: string;property nodeId
nodeId: string;property nodeMeta
nodeMeta: {[key: string]: string};property nodeName
nodeName: string;property port
port: string;property taggedAddresses
taggedAddresses: {[key: string]: string};property tags
tags: string[];interface GetCatalogServicesQueryOption
interface GetCatalogServicesQueryOptionproperty allowStale
allowStale?: undefined | false | true;property datacenter
datacenter?: undefined | string;property namespace
namespace?: undefined | string;property near
near?: undefined | string;property nodeMeta
nodeMeta?: undefined | {[key: string]: string};property requireConsistent
requireConsistent?: undefined | false | true;property token
token?: undefined | string;property waitIndex
waitIndex?: undefined | number;property waitTime
waitTime?: undefined | string;interface GetKeyPrefixSubkeyCollection
interface GetKeyPrefixSubkeyCollectionproperty default
default?: undefined | string;This is the default value to set for var.<name>
if the key does not exist in Consul. Defaults to an empty string.
property name
name: string;This is the name of the key. This value of the
key is exposed as var.<name>. This is not the path of the subkey
in Consul.
property path
path: string;This is the subkey path in Consul (which will be appended
to the given pathPrefix) to construct the full key that will be used
to read the value.
interface GetKeysKey
interface GetKeysKeyproperty default
default?: undefined | string;This is the default value to set for var.<name>
if the key does not exist in Consul. Defaults to an empty string.
property name
name: string;This is the name of the key. This value of the
key is exposed as var.<name>. This is not the path of the key
in Consul.
property path
path: string;This is the path in Consul that should be read or written to.
interface GetNetworkAreaMembersMember
interface GetNetworkAreaMembersMemberproperty address
address: string;The IP address of the server.
property build
build: string;The Consul version running on the node.
property datacenter
datacenter: string;The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.
property id
id: string;The node ID of the server.
property name
name: string;The node name of the server, with its datacenter appended.
property port
port: number;The server RPC port the node.
property protocol
protocol: number;The protocol version being spoken by the node.
property role
role: string;Role is always "server" since only Consul servers can participate
in network areas.
property rtt
rtt: number;An estimated network round trip time from the server answering the query to the given server, in nanoseconds. This is computed using network coordinates.
property status
status: string;The current health status of the node, as determined by the
network area distributed failure detector. This will be "alive", "leaving",
or "failed". A "failed" status means that other servers are not able to
probe this server over its server RPC interface.
interface GetNodesNode
interface GetNodesNodeproperty address
address: string;property id
id: string;The Node ID of the Consul agent.
* meta - Node meta
data tag information, if any.
* name - The name
of the Consul node.
* address - The
IP address the node is advertising to the Consul cluster.
* taggedAddresses -
List of explicit LAN and WAN IP addresses for the agent.
property meta
meta: {[key: string]: string};property name
name: string;property taggedAddresses
taggedAddresses: {[key: string]: string};interface GetNodesQueryOption
interface GetNodesQueryOptionproperty allowStale
allowStale?: undefined | false | true;When true, the default, allow responses from
Consul servers that are followers.
property datacenter
datacenter?: undefined | string;The Consul datacenter to query. Defaults to the
same value found in queryOptions parameter specified below, or if that is
empty, the datacenter value found in the Consul agent that this provider is
configured to talk to then the datacenter in the provider setup.
property near
near?: undefined | string;property nodeMeta
nodeMeta?: undefined | {[key: string]: string};property requireConsistent
requireConsistent?: undefined | false | true;When true force the client to perform a
read on at least quorum servers and verify the result is the same. Defaults
to false.
property token
token?: undefined | string;Specify the Consul ACL token to use when performing the
request. This defaults to the same API token configured by the consul
provider but may be overriden if necessary.
property waitIndex
waitIndex?: undefined | number;Index number used to enable blocking quereis.
property waitTime
waitTime?: undefined | string;Max time the client should wait for a blocking query to return.
interface GetServiceHealthResult
interface GetServiceHealthResultproperty checks
checks: GetServiceHealthResultCheck[];property node
node: GetServiceHealthResultNode;The name of the node associated with this health-check.
property service
service: GetServiceHealthResultService;interface GetServiceHealthResultCheck
interface GetServiceHealthResultCheckproperty id
id: string;The ID of this health-check.
property name
name: string;The service name to select.
property node
node: string;The name of the node associated with this health-check.
property notes
notes: string;A human readable description of the current state of the health-check.
property output
output: string;The output of the health-check.
property serviceId
serviceId: string;The ID of the service associated to this health-check.
property serviceName
serviceName: string;The name of the service associated with this health-check.
property serviceTags
serviceTags: string[];The list of tags associated with this health-check.
property status
status: string;The status of this health-check.
interface GetServiceHealthResultNode
interface GetServiceHealthResultNodeproperty address
address: string;The address of this instance.
property datacenter
datacenter: string;The Consul datacenter to query.
property id
id: string;The ID of this health-check.
property meta
meta: {[key: string]: string};Service metadata tag information, if any.
property name
name: string;The service name to select.
property taggedAddresses
taggedAddresses: {[key: string]: string};interface GetServiceHealthResultService
interface GetServiceHealthResultServiceproperty address
address: string;The address of this instance.
property id
id: string;The ID of this health-check.
property meta
meta: {[key: string]: string};Service metadata tag information, if any.
property name
name: string;The service name to select.
property port
port: number;The port of this instance.
property tags
tags: string[];The list of tags associated with this instance.
interface GetServiceQueryOption
interface GetServiceQueryOptionproperty allowStale
allowStale?: undefined | false | true;When true, the default, allow responses from
Consul servers that are followers.
property datacenter
datacenter?: undefined | string;The Consul datacenter to query. Defaults to the
same value found in queryOptions parameter specified below, or if that is
empty, the datacenter value found in the Consul agent that this provider is
configured to talk to.
property namespace
namespace?: undefined | string;The namespace to lookup the service.
property near
near?: undefined | string;property nodeMeta
nodeMeta?: undefined | {[key: string]: string};property requireConsistent
requireConsistent?: undefined | false | true;When true force the client to perform a
read on at least quorum servers and verify the result is the same. Defaults
to false.
property token
token?: undefined | string;Specify the Consul ACL token to use when performing the
request. This defaults to the same API token configured by the consul
provider but may be overriden if necessary.
property waitIndex
waitIndex?: undefined | number;Index number used to enable blocking quereis.
property waitTime
waitTime?: undefined | string;Max time the client should wait for a blocking query to return.
interface GetServiceService
interface GetServiceServiceproperty address
address: string;property createIndex
createIndex: string;property enableTagOverride
enableTagOverride: string;property id
id: string;property meta
meta: {[key: string]: string};property modifyIndex
modifyIndex: string;property name
name: string;The service name to select.
property nodeAddress
nodeAddress: string;property nodeId
nodeId: string;The Node ID of the Consul agent advertising the service.
* nodeMeta - Node
meta data tag information, if any.
* nodeName - The
name of the Consul node.
* address -
The IP address of the service. If the ServiceAddress in the Consul catalog
is empty, this value is automatically populated with the nodeAddress (the
Address in the Consul Catalog).
* enableTagOverride -
Whether service tags can be overridden on this service.
* id - A
unique service instance identifier.
* name - The
name of the service.
* port -
Port number of the service.
* taggedAddresses -
List of explicit LAN and WAN IP addresses for the agent.
* tags -
List of tags for the service.
* meta - Service meta
data tag information, if any.
property nodeMeta
nodeMeta: {[key: string]: string};property nodeName
nodeName: string;property port
port: string;property taggedAddresses
taggedAddresses: {[key: string]: string};property tags
tags: string[];interface GetServicesQueryOption
interface GetServicesQueryOptionproperty allowStale
allowStale?: undefined | false | true;When true, the default, allow responses from
Consul servers that are followers.
property datacenter
datacenter?: undefined | string;The Consul datacenter to query. Defaults to the
same value found in queryOptions parameter specified below, or if that is
empty, the datacenter value found in the Consul agent that this provider is
configured to talk to.
property namespace
namespace?: undefined | string;The namespace to lookup the services.
property near
near?: undefined | string;property nodeMeta
nodeMeta?: undefined | {[key: string]: string};property requireConsistent
requireConsistent?: undefined | false | true;When true force the client to perform a
read on at least quorum servers and verify the result is the same. Defaults
to false.
property token
token?: undefined | string;Specify the Consul ACL token to use when performing the
request. This defaults to the same API token configured by the consul
provider but may be overriden if necessary.
property waitIndex
waitIndex?: undefined | number;Index number used to enable blocking quereis.
property waitTime
waitTime?: undefined | string;Max time the client should wait for a blocking query to return.
interface KeyPrefixSubkeyCollection
interface KeyPrefixSubkeyCollectionproperty flags
flags?: undefined | number;An unsigned integer value to attach to the key (defaults to 0).
property path
path: string;This is the path (which will be appended to the given
pathPrefix) in Consul that should be written to.
property value
value: string;The value to write to the given path.
interface KeysKey
interface KeysKeyproperty default
default?: undefined | string;property delete
delete?: undefined | false | true;If true, then the key will be deleted when either its configuration block is removed from the configuration or the entire resource is destroyed. Otherwise, it will be left in Consul. Defaults to false.
property flags
flags?: undefined | number;An unsigned integer value to attach to the key (defaults to 0).
property name
name?: undefined | string;property path
path: string;This is the path in Consul that should be written to.
property value
value: string;The value to write to the given path.
interface PreparedQueryDns
interface PreparedQueryDnsproperty ttl
ttl?: undefined | string;The TTL to send when returning DNS results.
interface PreparedQueryFailover
interface PreparedQueryFailoverproperty datacenters
datacenters?: string[];Remote datacenters to return results from.
property nearestN
nearestN?: undefined | number;Return results from this many datacenters, sorted in ascending order of estimated RTT.
interface PreparedQueryTemplate
interface PreparedQueryTemplateproperty regexp
regexp: string;The regular expression to match with. When using
namePrefixMatch, this regex is applied against the query name.
property type
type: string;The type of template matching to perform. Currently
only namePrefixMatch is supported.
interface ServiceCheck
interface ServiceCheckproperty checkId
checkId: string;An ID, unique per agent. Will default to name if not set.
property deregisterCriticalServiceAfter
deregisterCriticalServiceAfter?: undefined | string;The time after which
the service is automatically deregistered when in the critical state.
Defaults to 30s.
property headers
headers?: ServiceCheckHeader[];The headers to send for an HTTP check. The attributes of each header is given below.
property http
http?: undefined | string;The HTTP endpoint to call for an HTTP check.
property interval
interval: string;The interval to wait between each health-check invocation.
property method
method?: undefined | string;The method to use for HTTP health-checks. Defaults
to GET.
property name
name: string;The name of the health-check.
property notes
notes?: undefined | string;An opaque field meant to hold human readable text.
property status
status: string;The initial health-check status.
property tcp
tcp?: undefined | string;The TCP address and port to connect to for a TCP check.
property timeout
timeout: string;The timeout value for HTTP checks.
property tlsSkipVerify
tlsSkipVerify?: undefined | false | true;Whether to deactivate certificate
verification for HTTP health-checks. Defaults to false.
interface ServiceCheckHeader
interface ServiceCheckHeaderproperty name
name: string;The name of the header.
property values
values: string[];The header’s list of values.