GetKeyPrefix
Using GetKeyPrefix
function getKeyPrefix(args: GetKeyPrefixArgs, opts?: InvokeOptions): Promise<GetKeyPrefixResult>function get_key_prefix(datacenter=None, namespace=None, path_prefix=None, subkey_collection=None, token=None, opts=None)func LookupKeyPrefix(ctx *Context, args *LookupKeyPrefixArgs, opts ...InvokeOption) (*LookupKeyPrefixResult, error)Note: This function is named
LookupKeyPrefixin the Go SDK.
public static class GetKeyPrefix {
public static Task<GetKeyPrefixResult> InvokeAsync(GetKeyPrefixArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Path
Prefix string Specifies the common prefix shared by all keys that will be read by this data source instance. In most cases, this will end with a slash to read a “folder” of subkeys.
- Datacenter string
The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.
- Namespace string
The namespace to create the keys within.
- Subkey
Collection List<GetKey Prefix Subkey Collection Args> Specifies a subkey in Consul to be read. Supported values documented below. Multiple blocks supported.
- Token string
The ACL token to use. This overrides the token that the agent provides by default.
- Path
Prefix string Specifies the common prefix shared by all keys that will be read by this data source instance. In most cases, this will end with a slash to read a “folder” of subkeys.
- Datacenter string
The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.
- Namespace string
The namespace to create the keys within.
- Subkey
Collection []GetKey Prefix Subkey Collection Specifies a subkey in Consul to be read. Supported values documented below. Multiple blocks supported.
- Token string
The ACL token to use. This overrides the token that the agent provides by default.
- path
Prefix string Specifies the common prefix shared by all keys that will be read by this data source instance. In most cases, this will end with a slash to read a “folder” of subkeys.
- datacenter string
The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.
- namespace string
The namespace to create the keys within.
- subkey
Collection GetKey Prefix Subkey Collection[] Specifies a subkey in Consul to be read. Supported values documented below. Multiple blocks supported.
- token string
The ACL token to use. This overrides the token that the agent provides by default.
- path_
prefix str Specifies the common prefix shared by all keys that will be read by this data source instance. In most cases, this will end with a slash to read a “folder” of subkeys.
- datacenter str
The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.
- namespace str
The namespace to create the keys within.
- subkey_
collection List[GetKey Prefix Subkey Collection] Specifies a subkey in Consul to be read. Supported values documented below. Multiple blocks supported.
- token str
The ACL token to use. This overrides the token that the agent provides by default.
GetKeyPrefix Result
The following output properties are available:
- Datacenter string
The datacenter the keys are being read from.
- Id string
The provider-assigned unique ID for this managed resource.
- Path
Prefix string the common prefix shared by all keys being read. *
var.<name>- For each name given, the corresponding attribute has the value of the key.- Subkeys Dictionary<string, string>
A map of the subkeys and values is set if no
subkeyblock is provided.- Var Dictionary<string, string>
- Namespace string
- Subkey
Collection List<GetKey Prefix Subkey Collection> - Token string
- Datacenter string
The datacenter the keys are being read from.
- Id string
The provider-assigned unique ID for this managed resource.
- Path
Prefix string the common prefix shared by all keys being read. *
var.<name>- For each name given, the corresponding attribute has the value of the key.- Subkeys map[string]string
A map of the subkeys and values is set if no
subkeyblock is provided.- Var map[string]string
- Namespace string
- Subkey
Collection []GetKey Prefix Subkey Collection - Token string
- datacenter string
The datacenter the keys are being read from.
- id string
The provider-assigned unique ID for this managed resource.
- path
Prefix string the common prefix shared by all keys being read. *
var.<name>- For each name given, the corresponding attribute has the value of the key.- subkeys {[key: string]: string}
A map of the subkeys and values is set if no
subkeyblock is provided.- var {[key: string]: string}
- namespace string
- subkey
Collection GetKey Prefix Subkey Collection[] - token string
- datacenter str
The datacenter the keys are being read from.
- id str
The provider-assigned unique ID for this managed resource.
- path_
prefix str the common prefix shared by all keys being read. *
var.<name>- For each name given, the corresponding attribute has the value of the key.- subkeys Dict[str, str]
A map of the subkeys and values is set if no
subkeyblock is provided.- var Dict[str, str]
- namespace str
- subkey_
collection List[GetKey Prefix Subkey Collection] - token str
Supporting Types
GetKeyPrefixSubkeyCollection
- 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.- Path string
This is the subkey path in Consul (which will be appended to the given
path_prefix) to construct the full key that will be used to read the value.- Default string
This is the default value to set for
var.<name>if the key does not exist in Consul. Defaults to an empty string.
- 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.- Path string
This is the subkey path in Consul (which will be appended to the given
path_prefix) to construct the full key that will be used to read the value.- Default string
This is the default value to set for
var.<name>if the key does not exist in Consul. Defaults to an empty string.
- 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.- path string
This is the subkey path in Consul (which will be appended to the given
path_prefix) to construct the full key that will be used to read the value.- default string
This is the default value to set for
var.<name>if the key does not exist in Consul. Defaults to an empty string.
- name str
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.- path str
This is the subkey path in Consul (which will be appended to the given
path_prefix) to construct the full key that will be used to read the value.- default str
This is the default value to set for
var.<name>if the key does not exist in Consul. Defaults to an empty string.
Package Details
- Repository
- https://github.com/pulumi/pulumi-consul
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
consulTerraform Provider.