Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.ecs.getHpcClusters
Explore with Pulumi AI
This data source provides the Ecs Hpc Clusters of the current Alibaba Cloud user.
NOTE: Available in v1.116.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.ecs.getHpcClusters({
ids: ["hpc-bp1i09xxxxxxxx"],
nameRegex: "tf-testAcc",
});
export const firstEcsHpcClusterId = example.then(example => example.clusters?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.ecs.get_hpc_clusters(ids=["hpc-bp1i09xxxxxxxx"],
name_regex="tf-testAcc")
pulumi.export("firstEcsHpcClusterId", example.clusters[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := ecs.GetHpcClusters(ctx, &ecs.GetHpcClustersArgs{
Ids: []string{
"hpc-bp1i09xxxxxxxx",
},
NameRegex: pulumi.StringRef("tf-testAcc"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstEcsHpcClusterId", example.Clusters[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = AliCloud.Ecs.GetHpcClusters.Invoke(new()
{
Ids = new[]
{
"hpc-bp1i09xxxxxxxx",
},
NameRegex = "tf-testAcc",
});
return new Dictionary<string, object?>
{
["firstEcsHpcClusterId"] = example.Apply(getHpcClustersResult => getHpcClustersResult.Clusters[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetHpcClustersArgs;
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 example = EcsFunctions.getHpcClusters(GetHpcClustersArgs.builder()
.ids("hpc-bp1i09xxxxxxxx")
.nameRegex("tf-testAcc")
.build());
ctx.export("firstEcsHpcClusterId", example.applyValue(getHpcClustersResult -> getHpcClustersResult.clusters()[0].id()));
}
}
variables:
example:
fn::invoke:
Function: alicloud:ecs:getHpcClusters
Arguments:
ids:
- hpc-bp1i09xxxxxxxx
nameRegex: tf-testAcc
outputs:
firstEcsHpcClusterId: ${example.clusters[0].id}
Using getHpcClusters
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 getHpcClusters(args: GetHpcClustersArgs, opts?: InvokeOptions): Promise<GetHpcClustersResult>
function getHpcClustersOutput(args: GetHpcClustersOutputArgs, opts?: InvokeOptions): Output<GetHpcClustersResult>
def get_hpc_clusters(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetHpcClustersResult
def get_hpc_clusters_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetHpcClustersResult]
func GetHpcClusters(ctx *Context, args *GetHpcClustersArgs, opts ...InvokeOption) (*GetHpcClustersResult, error)
func GetHpcClustersOutput(ctx *Context, args *GetHpcClustersOutputArgs, opts ...InvokeOption) GetHpcClustersResultOutput
> Note: This function is named GetHpcClusters
in the Go SDK.
public static class GetHpcClusters
{
public static Task<GetHpcClustersResult> InvokeAsync(GetHpcClustersArgs args, InvokeOptions? opts = null)
public static Output<GetHpcClustersResult> Invoke(GetHpcClustersInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetHpcClustersResult> getHpcClusters(GetHpcClustersArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:ecs/getHpcClusters:getHpcClusters
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Hpc Cluster IDs.
- Name
Regex string - A regex string to filter results by Hpc Cluster name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Ids []string
- A list of Hpc Cluster IDs.
- Name
Regex string - A regex string to filter results by Hpc Cluster name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- ids List<String>
- A list of Hpc Cluster IDs.
- name
Regex String - A regex string to filter results by Hpc Cluster name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- ids string[]
- A list of Hpc Cluster IDs.
- name
Regex string - A regex string to filter results by Hpc Cluster name.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- ids Sequence[str]
- A list of Hpc Cluster IDs.
- name_
regex str - A regex string to filter results by Hpc Cluster name.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- ids List<String>
- A list of Hpc Cluster IDs.
- name
Regex String - A regex string to filter results by Hpc Cluster name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getHpcClusters Result
The following output properties are available:
- Clusters
List<Pulumi.
Ali Cloud. Ecs. Outputs. Get Hpc Clusters Cluster> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Name
Regex string - Output
File string
- Clusters
[]Get
Hpc Clusters Cluster - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Name
Regex string - Output
File string
- clusters
List<Get
Hpc Clusters Cluster> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- name
Regex String - output
File String
- clusters
Get
Hpc Clusters Cluster[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- name
Regex string - output
File string
- clusters
Sequence[Get
Hpc Clusters Cluster] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- name_
regex str - output_
file str
- clusters List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- name
Regex String - output
File String
Supporting Types
GetHpcClustersCluster
- Description string
- The description of ECS Hpc Cluster.
- Hpc
Cluster stringId - The ID of the Hpc Cluster.
- Id string
- The ID of the Hpc Cluster.
- Name string
- The name of ECS Hpc Cluster.
- Description string
- The description of ECS Hpc Cluster.
- Hpc
Cluster stringId - The ID of the Hpc Cluster.
- Id string
- The ID of the Hpc Cluster.
- Name string
- The name of ECS Hpc Cluster.
- description String
- The description of ECS Hpc Cluster.
- hpc
Cluster StringId - The ID of the Hpc Cluster.
- id String
- The ID of the Hpc Cluster.
- name String
- The name of ECS Hpc Cluster.
- description string
- The description of ECS Hpc Cluster.
- hpc
Cluster stringId - The ID of the Hpc Cluster.
- id string
- The ID of the Hpc Cluster.
- name string
- The name of ECS Hpc Cluster.
- description str
- The description of ECS Hpc Cluster.
- hpc_
cluster_ strid - The ID of the Hpc Cluster.
- id str
- The ID of the Hpc Cluster.
- name str
- The name of ECS Hpc Cluster.
- description String
- The description of ECS Hpc Cluster.
- hpc
Cluster StringId - The ID of the Hpc Cluster.
- id String
- The ID of the Hpc Cluster.
- name String
- The name of ECS Hpc Cluster.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.