get Clusters
This data source provides the Ehpc Clusters of the current Alibaba Cloud user.
NOTE: Available in v1.173.0+.
Example Usage
Basic Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ehpc.EhpcFunctions;
import com.pulumi.alicloud.ehpc.inputs.GetClustersArgs;
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 = EhpcFunctions.getClusters(GetClustersArgs.builder()
.ids("example_id")
.build());
ctx.export("ehpcClusterId1", ids.applyValue(getClustersResult -> getClustersResult.clusters()[0].id()));
final var nameRegex = EhpcFunctions.getClusters(GetClustersArgs.builder()
.nameRegex("^my-Cluster")
.build());
ctx.export("ehpcClusterId2", nameRegex.applyValue(getClustersResult -> getClustersResult.clusters()[0].id()));
}
}
Content copied to clipboard
Return
A collection of values returned by getClusters.
Parameters
argument
A collection of arguments for invoking getClusters.
suspend fun getClusters(enableDetails: Boolean? = null, ids: List<String>? = null, nameRegex: String? = null, outputFile: String? = null, status: String? = null): GetClustersResult
Return
A collection of values returned by getClusters.
See also
Parameters
enable Details
Default to false
. Set it to true
can output more details about resource attributes.
ids
A list of Cluster IDs.
name Regex
A regex string to filter results by Cluster name.
output File
status
The status of the resource.
suspend fun getClusters(argument: suspend GetClustersPlainArgsBuilder.() -> Unit): GetClustersResult
Return
A collection of values returned by getClusters.
See also
Parameters
argument
Builder for com.pulumi.alicloud.ehpc.kotlin.inputs.GetClustersPlainArgs.