Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi
alicloud.ehpc.getClusters
Explore with Pulumi AI
This data source provides the Ehpc Clusters of the current Alibaba Cloud user.
NOTE: Available in v1.173.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.ehpc.getClusters({
ids: ["example_id"],
});
export const ehpcClusterId1 = ids.then(ids => ids.clusters?.[0]?.id);
const nameRegex = alicloud.ehpc.getClusters({
nameRegex: "^my-Cluster",
});
export const ehpcClusterId2 = nameRegex.then(nameRegex => nameRegex.clusters?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.ehpc.get_clusters(ids=["example_id"])
pulumi.export("ehpcClusterId1", ids.clusters[0].id)
name_regex = alicloud.ehpc.get_clusters(name_regex="^my-Cluster")
pulumi.export("ehpcClusterId2", name_regex.clusters[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ehpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := ehpc.GetClusters(ctx, &ehpc.GetClustersArgs{
Ids: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("ehpcClusterId1", ids.Clusters[0].Id)
nameRegex, err := ehpc.GetClusters(ctx, &ehpc.GetClustersArgs{
NameRegex: pulumi.StringRef("^my-Cluster"),
}, nil)
if err != nil {
return err
}
ctx.Export("ehpcClusterId2", nameRegex.Clusters[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Ehpc.GetClusters.Invoke(new()
{
Ids = new[]
{
"example_id",
},
});
var nameRegex = AliCloud.Ehpc.GetClusters.Invoke(new()
{
NameRegex = "^my-Cluster",
});
return new Dictionary<string, object?>
{
["ehpcClusterId1"] = ids.Apply(getClustersResult => getClustersResult.Clusters[0]?.Id),
["ehpcClusterId2"] = nameRegex.Apply(getClustersResult => getClustersResult.Clusters[0]?.Id),
};
});
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()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:ehpc:getClusters
Arguments:
ids:
- example_id
nameRegex:
fn::invoke:
Function: alicloud:ehpc:getClusters
Arguments:
nameRegex: ^my-Cluster
outputs:
ehpcClusterId1: ${ids.clusters[0].id}
ehpcClusterId2: ${nameRegex.clusters[0].id}
Using getClusters
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 getClusters(args: GetClustersArgs, opts?: InvokeOptions): Promise<GetClustersResult>
function getClustersOutput(args: GetClustersOutputArgs, opts?: InvokeOptions): Output<GetClustersResult>
def get_clusters(enable_details: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetClustersResult
def get_clusters_output(enable_details: Optional[pulumi.Input[bool]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetClustersResult]
func GetClusters(ctx *Context, args *GetClustersArgs, opts ...InvokeOption) (*GetClustersResult, error)
func GetClustersOutput(ctx *Context, args *GetClustersOutputArgs, opts ...InvokeOption) GetClustersResultOutput
> Note: This function is named GetClusters
in the Go SDK.
public static class GetClusters
{
public static Task<GetClustersResult> InvokeAsync(GetClustersArgs args, InvokeOptions? opts = null)
public static Output<GetClustersResult> Invoke(GetClustersInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetClustersResult> getClusters(GetClustersArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:ehpc/getClusters:getClusters
arguments:
# arguments dictionary
The following arguments are supported:
- Enable
Details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - Ids List<string>
- A list of Cluster IDs.
- Name
Regex string - A regex string to filter results by Cluster name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- The status of the resource. Valid values:
- Enable
Details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - Ids []string
- A list of Cluster IDs.
- Name
Regex string - A regex string to filter results by Cluster name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- The status of the resource. Valid values:
- enable
Details Boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids List<String>
- A list of Cluster IDs.
- name
Regex String - A regex string to filter results by Cluster name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- The status of the resource. Valid values:
- enable
Details boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids string[]
- A list of Cluster IDs.
- name
Regex string - A regex string to filter results by Cluster name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - status string
- The status of the resource. Valid values:
- enable_
details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - ids Sequence[str]
- A list of Cluster IDs.
- name_
regex str - A regex string to filter results by Cluster name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - status str
- The status of the resource. Valid values:
- enable
Details Boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids List<String>
- A list of Cluster IDs.
- name
Regex String - A regex string to filter results by Cluster name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- The status of the resource. Valid values:
getClusters Result
The following output properties are available:
- Clusters
List<Pulumi.
Ali Cloud. Ehpc. Outputs. Get Clusters Cluster> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Enable
Details bool - Name
Regex string - Output
File string - Status string
- Clusters
[]Get
Clusters Cluster - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Enable
Details bool - Name
Regex string - Output
File string - Status string
- clusters
List<Get
Clusters Cluster> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- enable
Details Boolean - name
Regex String - output
File String - status String
- clusters
Get
Clusters Cluster[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- enable
Details boolean - name
Regex string - output
File string - status string
- clusters
Sequence[Get
Clusters Cluster] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- enable_
details bool - name_
regex str - output_
file str - status str
- clusters List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- enable
Details Boolean - name
Regex String - output
File String - status String
Supporting Types
GetClustersCluster
- Account
Type string - The server type of the account.
- Applications
List<Pulumi.
Ali Cloud. Ehpc. Inputs. Get Clusters Cluster Application> - Client
Version string - The version number of the client used by the cluster.
- Cluster
Id string - Cluster
Name string - Compute
Count int - Compute
Instance stringType - Create
Time string - Deploy
Mode string - Description string
- Ha
Enable bool - Id string
- Image
Id string - Image
Owner stringAlias - Login
Count int - Login
Instance stringType - Manager
Count int - Manager
Instance stringType - Os
Tag string - Post
Install List<Pulumi.Scripts Ali Cloud. Ehpc. Inputs. Get Clusters Cluster Post Install Script> - Remote
Directory string - Scc
Cluster stringId - Scheduler
Type string - Security
Group stringId - Status string
- The status of the resource. Valid values:
- Volume
Id string - Volume
Mountpoint string - Volume
Protocol string - Volume
Type string - Vpc
Id string - Vswitch
Id string - Zone
Id string
- Account
Type string - The server type of the account.
- Applications
[]Get
Clusters Cluster Application - Client
Version string - The version number of the client used by the cluster.
- Cluster
Id string - Cluster
Name string - Compute
Count int - Compute
Instance stringType - Create
Time string - Deploy
Mode string - Description string
- Ha
Enable bool - Id string
- Image
Id string - Image
Owner stringAlias - Login
Count int - Login
Instance stringType - Manager
Count int - Manager
Instance stringType - Os
Tag string - Post
Install []GetScripts Clusters Cluster Post Install Script - Remote
Directory string - Scc
Cluster stringId - Scheduler
Type string - Security
Group stringId - Status string
- The status of the resource. Valid values:
- Volume
Id string - Volume
Mountpoint string - Volume
Protocol string - Volume
Type string - Vpc
Id string - Vswitch
Id string - Zone
Id string
- account
Type String - The server type of the account.
- applications
List<Get
Clusters Cluster Application> - client
Version String - The version number of the client used by the cluster.
- cluster
Id String - cluster
Name String - compute
Count Integer - compute
Instance StringType - create
Time String - deploy
Mode String - description String
- ha
Enable Boolean - id String
- image
Id String - image
Owner StringAlias - login
Count Integer - login
Instance StringType - manager
Count Integer - manager
Instance StringType - os
Tag String - post
Install List<GetScripts Clusters Cluster Post Install Script> - remote
Directory String - scc
Cluster StringId - scheduler
Type String - security
Group StringId - status String
- The status of the resource. Valid values:
- volume
Id String - volume
Mountpoint String - volume
Protocol String - volume
Type String - vpc
Id String - vswitch
Id String - zone
Id String
- account
Type string - The server type of the account.
- applications
Get
Clusters Cluster Application[] - client
Version string - The version number of the client used by the cluster.
- cluster
Id string - cluster
Name string - compute
Count number - compute
Instance stringType - create
Time string - deploy
Mode string - description string
- ha
Enable boolean - id string
- image
Id string - image
Owner stringAlias - login
Count number - login
Instance stringType - manager
Count number - manager
Instance stringType - os
Tag string - post
Install GetScripts Clusters Cluster Post Install Script[] - remote
Directory string - scc
Cluster stringId - scheduler
Type string - security
Group stringId - status string
- The status of the resource. Valid values:
- volume
Id string - volume
Mountpoint string - volume
Protocol string - volume
Type string - vpc
Id string - vswitch
Id string - zone
Id string
- account_
type str - The server type of the account.
- applications
Sequence[Get
Clusters Cluster Application] - client_
version str - The version number of the client used by the cluster.
- cluster_
id str - cluster_
name str - compute_
count int - compute_
instance_ strtype - create_
time str - deploy_
mode str - description str
- ha_
enable bool - id str
- image_
id str - image_
owner_ stralias - login_
count int - login_
instance_ strtype - manager_
count int - manager_
instance_ strtype - os_
tag str - post_
install_ Sequence[Getscripts Clusters Cluster Post Install Script] - remote_
directory str - scc_
cluster_ strid - scheduler_
type str - security_
group_ strid - status str
- The status of the resource. Valid values:
- volume_
id str - volume_
mountpoint str - volume_
protocol str - volume_
type str - vpc_
id str - vswitch_
id str - zone_
id str
- account
Type String - The server type of the account.
- applications List<Property Map>
- client
Version String - The version number of the client used by the cluster.
- cluster
Id String - cluster
Name String - compute
Count Number - compute
Instance StringType - create
Time String - deploy
Mode String - description String
- ha
Enable Boolean - id String
- image
Id String - image
Owner StringAlias - login
Count Number - login
Instance StringType - manager
Count Number - manager
Instance StringType - os
Tag String - post
Install List<Property Map>Scripts - remote
Directory String - scc
Cluster StringId - scheduler
Type String - security
Group StringId - status String
- The status of the resource. Valid values:
- volume
Id String - volume
Mountpoint String - volume
Protocol String - volume
Type String - vpc
Id String - vswitch
Id String - zone
Id String
GetClustersClusterApplication
- Tag string
- Tag string
- tag String
- tag string
- tag str
- tag String
GetClustersClusterPostInstallScript
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.