Class PreparedQuery
Inherited Members
Namespace: Pulumi.Consul
Assembly: Pulumi.Consul.dll
Syntax
public class PreparedQuery : CustomResource
Constructors
View SourcePreparedQuery(String, PreparedQueryArgs, CustomResourceOptions)
Create a PreparedQuery resource with the given unique name, arguments, and options.
Declaration
public PreparedQuery(string name, PreparedQueryArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| PreparedQueryArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceConnect
When true the prepared query will return connect
proxy services for a queried service. Conditions such as tags in the
prepared query will be matched against the proxy service. Defaults to false.
Declaration
public Output<bool?> Connect { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Datacenter
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
Declaration
public Output<string> Datacenter { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Dns
Settings for controlling the DNS response details.
Declaration
public Output<PreparedQueryDns> Dns { get; }
Property Value
| Type | Description |
|---|---|
| Output<PreparedQueryDns> |
Failover
Options for controlling behavior when no healthy nodes are available in the local DC.
Declaration
public Output<PreparedQueryFailover> Failover { get; }
Property Value
| Type | Description |
|---|---|
| Output<PreparedQueryFailover> |
IgnoreCheckIds
Specifies a list of check IDs that should be ignored when filtering unhealthy instances. This is mostly useful in an emergency or as a temporary measure when a health check is found to be unreliable. Being able to ignore it in centrally-defined queries can be simpler than de-registering the check as an interim solution until the check can be fixed.
Declaration
public Output<ImmutableArray<string>> IgnoreCheckIds { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Name
The name of the prepared query. Used to identify the prepared query during requests. Can be specified as an empty string to configure the query as a catch-all.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Near
Allows specifying the name of a node to sort results
near using Consul's distance sorting and network coordinates. The magic
_agent value can be used to always sort nearest the node servicing the
request.
Declaration
public Output<string> Near { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NodeMeta
Specifies a list of user-defined key/value pairs that will be used for filtering the query results to nodes with the given metadata values present.
Declaration
public Output<ImmutableDictionary<string, string>> NodeMeta { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
OnlyPassing
When true, the prepared query will only
return nodes with passing health checks in the result.
Declaration
public Output<bool?> OnlyPassing { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Service
The name of the service to query.
Declaration
public Output<string> Service { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ServiceMeta
Specifies a list of user-defined key/value pairs that will be used for filtering the query results to services with the given metadata values present.
Declaration
public Output<ImmutableDictionary<string, string>> ServiceMeta { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
Session
The name of the Consul session to tie this query's lifetime to. This is an advanced parameter that should not be used without a complete understanding of Consul sessions and the implications of their use (it is recommended to leave this blank in nearly all cases). If this parameter is omitted the query will not expire.
Declaration
public Output<string> Session { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
StoredToken
The ACL token to store with the prepared query. This token will be used by default whenever the query is executed.
Declaration
public Output<string> StoredToken { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
The list of required and/or disallowed tags. If a tag is in this list it must be present. If the tag is preceded with a "!" then it is disallowed.
Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Template
Query templating options. This is used to make a single prepared query respond to many different requests.
Declaration
public Output<PreparedQueryTemplate> Template { get; }
Property Value
| Type | Description |
|---|---|
| Output<PreparedQueryTemplate> |
Token
The ACL token to use when saving the prepared query. This overrides the token that the agent provides by default.
Declaration
public Output<string> Token { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, PreparedQueryState, CustomResourceOptions)
Get an existing PreparedQuery resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static PreparedQuery Get(string name, Input<string> id, PreparedQueryState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| PreparedQueryState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| PreparedQuery |