Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.mse.getZnodes
Explore with Pulumi AI
This data source provides the Mse Znodes of the current Alibaba Cloud user.
NOTE: Available in v1.162.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.mse.getZnodes({
clusterId: "example_value",
path: "/",
ids: [
"example_value-1",
"example_value-2",
],
});
export const mseZnodeId1 = ids.then(ids => ids.znodes?.[0]?.id);
const nameRegex = alicloud.mse.getZnodes({
path: "/",
clusterId: "example_value",
nameRegex: "^my-Znode",
});
export const mseZnodeId2 = nameRegex.then(nameRegex => nameRegex.znodes?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.mse.get_znodes(cluster_id="example_value",
path="/",
ids=[
"example_value-1",
"example_value-2",
])
pulumi.export("mseZnodeId1", ids.znodes[0].id)
name_regex = alicloud.mse.get_znodes(path="/",
cluster_id="example_value",
name_regex="^my-Znode")
pulumi.export("mseZnodeId2", name_regex.znodes[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/mse"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := mse.GetZnodes(ctx, &mse.GetZnodesArgs{
ClusterId: "example_value",
Path: "/",
Ids: []string{
"example_value-1",
"example_value-2",
},
}, nil)
if err != nil {
return err
}
ctx.Export("mseZnodeId1", ids.Znodes[0].Id)
nameRegex, err := mse.GetZnodes(ctx, &mse.GetZnodesArgs{
Path: "/",
ClusterId: "example_value",
NameRegex: pulumi.StringRef("^my-Znode"),
}, nil)
if err != nil {
return err
}
ctx.Export("mseZnodeId2", nameRegex.Znodes[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Mse.GetZnodes.Invoke(new()
{
ClusterId = "example_value",
Path = "/",
Ids = new[]
{
"example_value-1",
"example_value-2",
},
});
var nameRegex = AliCloud.Mse.GetZnodes.Invoke(new()
{
Path = "/",
ClusterId = "example_value",
NameRegex = "^my-Znode",
});
return new Dictionary<string, object?>
{
["mseZnodeId1"] = ids.Apply(getZnodesResult => getZnodesResult.Znodes[0]?.Id),
["mseZnodeId2"] = nameRegex.Apply(getZnodesResult => getZnodesResult.Znodes[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.mse.MseFunctions;
import com.pulumi.alicloud.mse.inputs.GetZnodesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var ids = MseFunctions.getZnodes(GetZnodesArgs.builder()
.clusterId("example_value")
.path("/")
.ids(
"example_value-1",
"example_value-2")
.build());
ctx.export("mseZnodeId1", ids.applyValue(getZnodesResult -> getZnodesResult.znodes()[0].id()));
final var nameRegex = MseFunctions.getZnodes(GetZnodesArgs.builder()
.path("/")
.clusterId("example_value")
.nameRegex("^my-Znode")
.build());
ctx.export("mseZnodeId2", nameRegex.applyValue(getZnodesResult -> getZnodesResult.znodes()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:mse:getZnodes
Arguments:
clusterId: example_value
path: /
ids:
- example_value-1
- example_value-2
nameRegex:
fn::invoke:
Function: alicloud:mse:getZnodes
Arguments:
path: /
clusterId: example_value
nameRegex: ^my-Znode
outputs:
mseZnodeId1: ${ids.znodes[0].id}
mseZnodeId2: ${nameRegex.znodes[0].id}
Using getZnodes
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getZnodes(args: GetZnodesArgs, opts?: InvokeOptions): Promise<GetZnodesResult>
function getZnodesOutput(args: GetZnodesOutputArgs, opts?: InvokeOptions): Output<GetZnodesResult>
def get_znodes(accept_language: Optional[str] = None,
cluster_id: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
path: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetZnodesResult
def get_znodes_output(accept_language: Optional[pulumi.Input[str]] = None,
cluster_id: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
path: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetZnodesResult]
func GetZnodes(ctx *Context, args *GetZnodesArgs, opts ...InvokeOption) (*GetZnodesResult, error)
func GetZnodesOutput(ctx *Context, args *GetZnodesOutputArgs, opts ...InvokeOption) GetZnodesResultOutput
> Note: This function is named GetZnodes
in the Go SDK.
public static class GetZnodes
{
public static Task<GetZnodesResult> InvokeAsync(GetZnodesArgs args, InvokeOptions? opts = null)
public static Output<GetZnodesResult> Invoke(GetZnodesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetZnodesResult> getZnodes(GetZnodesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:mse/getZnodes:getZnodes
arguments:
# arguments dictionary
The following arguments are supported:
- Cluster
Id string - The ID of the Cluster.
- Path string
- The Node path.
- Accept
Language string - The language type of the returned information. Valid values:
zh
oren
. - Ids List<string>
- A list of Znode IDs.
- Name
Regex string - A regex string to filter results by Znode name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Cluster
Id string - The ID of the Cluster.
- Path string
- The Node path.
- Accept
Language string - The language type of the returned information. Valid values:
zh
oren
. - Ids []string
- A list of Znode IDs.
- Name
Regex string - A regex string to filter results by Znode name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- cluster
Id String - The ID of the Cluster.
- path String
- The Node path.
- accept
Language String - The language type of the returned information. Valid values:
zh
oren
. - ids List<String>
- A list of Znode IDs.
- name
Regex String - A regex string to filter results by Znode name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- cluster
Id string - The ID of the Cluster.
- path string
- The Node path.
- accept
Language string - The language type of the returned information. Valid values:
zh
oren
. - ids string[]
- A list of Znode IDs.
- name
Regex string - A regex string to filter results by Znode name.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- cluster_
id str - The ID of the Cluster.
- path str
- The Node path.
- accept_
language str - The language type of the returned information. Valid values:
zh
oren
. - ids Sequence[str]
- A list of Znode IDs.
- name_
regex str - A regex string to filter results by Znode name.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- cluster
Id String - The ID of the Cluster.
- path String
- The Node path.
- accept
Language String - The language type of the returned information. Valid values:
zh
oren
. - ids List<String>
- A list of Znode IDs.
- name
Regex String - A regex string to filter results by Znode name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getZnodes Result
The following output properties are available:
- Cluster
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Path string
- Znodes
List<Pulumi.
Ali Cloud. Mse. Outputs. Get Znodes Znode> - Accept
Language string - Name
Regex string - Output
File string
- Cluster
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Path string
- Znodes
[]Get
Znodes Znode - Accept
Language string - Name
Regex string - Output
File string
- cluster
Id String - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- path String
- znodes
List<Get
Znodes Znode> - accept
Language String - name
Regex String - output
File String
- cluster
Id string - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- path string
- znodes
Get
Znodes Znode[] - accept
Language string - name
Regex string - output
File string
- cluster_
id str - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- path str
- znodes
Sequence[Get
Znodes Znode] - accept_
language str - name_
regex str - output_
file str
- cluster
Id String - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- path String
- znodes List<Property Map>
- accept
Language String - name
Regex String - output
File String
Supporting Types
GetZnodesZnode
- cluster_
id str - The ID of the Cluster.
- data str
- The Node data.
- dir bool
- Node list information, the value is as follows:
- id str
- The ID of the Znode. The value formats as
<cluster_id>:<path>
. - path str
- The Node path.
- znode_
name str - The Node name.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.