Alibaba Cloud
getEcsDedicatedHostClusters
This data source provides the Ecs Dedicated Host Clusters of the current Alibaba Cloud user.
NOTE: Available in v1.146.0+.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var ids = Output.Create(AliCloud.Ecs.GetEcsDedicatedHostClusters.InvokeAsync(new AliCloud.Ecs.GetEcsDedicatedHostClustersArgs
{
Ids =
{
"example_id",
},
}));
this.EcsDedicatedHostClusterId1 = ids.Apply(ids => ids.Clusters?[0]?.Id);
var nameRegex = Output.Create(AliCloud.Ecs.GetEcsDedicatedHostClusters.InvokeAsync(new AliCloud.Ecs.GetEcsDedicatedHostClustersArgs
{
NameRegex = "^my-DedicatedHostCluster",
}));
this.EcsDedicatedHostClusterId2 = nameRegex.Apply(nameRegex => nameRegex.Clusters?[0]?.Id);
var zoneId = Output.Create(AliCloud.Ecs.GetEcsDedicatedHostClusters.InvokeAsync(new AliCloud.Ecs.GetEcsDedicatedHostClustersArgs
{
ZoneId = "example_value",
}));
this.EcsDedicatedHostClusterId3 = zoneId.Apply(zoneId => zoneId.Clusters?[0]?.Id);
var clusterName = Output.Create(AliCloud.Ecs.GetEcsDedicatedHostClusters.InvokeAsync(new AliCloud.Ecs.GetEcsDedicatedHostClustersArgs
{
DedicatedHostClusterName = "example_value",
}));
this.EcsDedicatedHostClusterId4 = clusterName.Apply(clusterName => clusterName.Clusters?[0]?.Id);
var clusterIds = Output.Create(AliCloud.Ecs.GetEcsDedicatedHostClusters.InvokeAsync(new AliCloud.Ecs.GetEcsDedicatedHostClustersArgs
{
DedicatedHostClusterIds =
{
"example_id",
},
}));
this.EcsDedicatedHostClusterId5 = clusterIds.Apply(clusterIds => clusterIds.Clusters?[0]?.Id);
}
[Output("ecsDedicatedHostClusterId1")]
public Output<string> EcsDedicatedHostClusterId1 { get; set; }
[Output("ecsDedicatedHostClusterId2")]
public Output<string> EcsDedicatedHostClusterId2 { get; set; }
[Output("ecsDedicatedHostClusterId3")]
public Output<string> EcsDedicatedHostClusterId3 { get; set; }
[Output("ecsDedicatedHostClusterId4")]
public Output<string> EcsDedicatedHostClusterId4 { get; set; }
[Output("ecsDedicatedHostClusterId5")]
public Output<string> EcsDedicatedHostClusterId5 { get; set; }
}
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 {
ids, err := ecs.GetEcsDedicatedHostClusters(ctx, &ecs.GetEcsDedicatedHostClustersArgs{
Ids: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("ecsDedicatedHostClusterId1", ids.Clusters[0].Id)
nameRegex, err := ecs.GetEcsDedicatedHostClusters(ctx, &ecs.GetEcsDedicatedHostClustersArgs{
NameRegex: pulumi.StringRef("^my-DedicatedHostCluster"),
}, nil)
if err != nil {
return err
}
ctx.Export("ecsDedicatedHostClusterId2", nameRegex.Clusters[0].Id)
zoneId, err := ecs.GetEcsDedicatedHostClusters(ctx, &ecs.GetEcsDedicatedHostClustersArgs{
ZoneId: pulumi.StringRef("example_value"),
}, nil)
if err != nil {
return err
}
ctx.Export("ecsDedicatedHostClusterId3", zoneId.Clusters[0].Id)
clusterName, err := ecs.GetEcsDedicatedHostClusters(ctx, &ecs.GetEcsDedicatedHostClustersArgs{
DedicatedHostClusterName: pulumi.StringRef("example_value"),
}, nil)
if err != nil {
return err
}
ctx.Export("ecsDedicatedHostClusterId4", clusterName.Clusters[0].Id)
clusterIds, err := ecs.GetEcsDedicatedHostClusters(ctx, &ecs.GetEcsDedicatedHostClustersArgs{
DedicatedHostClusterIds: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("ecsDedicatedHostClusterId5", clusterIds.Clusters[0].Id)
return nil
})
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.ecs.get_ecs_dedicated_host_clusters(ids=["example_id"])
pulumi.export("ecsDedicatedHostClusterId1", ids.clusters[0].id)
name_regex = alicloud.ecs.get_ecs_dedicated_host_clusters(name_regex="^my-DedicatedHostCluster")
pulumi.export("ecsDedicatedHostClusterId2", name_regex.clusters[0].id)
zone_id = alicloud.ecs.get_ecs_dedicated_host_clusters(zone_id="example_value")
pulumi.export("ecsDedicatedHostClusterId3", zone_id.clusters[0].id)
cluster_name = alicloud.ecs.get_ecs_dedicated_host_clusters(dedicated_host_cluster_name="example_value")
pulumi.export("ecsDedicatedHostClusterId4", cluster_name.clusters[0].id)
cluster_ids = alicloud.ecs.get_ecs_dedicated_host_clusters(dedicated_host_cluster_ids=["example_id"])
pulumi.export("ecsDedicatedHostClusterId5", cluster_ids.clusters[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.ecs.getEcsDedicatedHostClusters({
ids: ["example_id"],
});
export const ecsDedicatedHostClusterId1 = ids.then(ids => ids.clusters?[0]?.id);
const nameRegex = alicloud.ecs.getEcsDedicatedHostClusters({
nameRegex: "^my-DedicatedHostCluster",
});
export const ecsDedicatedHostClusterId2 = nameRegex.then(nameRegex => nameRegex.clusters?[0]?.id);
const zoneId = alicloud.ecs.getEcsDedicatedHostClusters({
zoneId: "example_value",
});
export const ecsDedicatedHostClusterId3 = zoneId.then(zoneId => zoneId.clusters?[0]?.id);
const clusterName = alicloud.ecs.getEcsDedicatedHostClusters({
dedicatedHostClusterName: "example_value",
});
export const ecsDedicatedHostClusterId4 = clusterName.then(clusterName => clusterName.clusters?[0]?.id);
const clusterIds = alicloud.ecs.getEcsDedicatedHostClusters({
dedicatedHostClusterIds: ["example_id"],
});
export const ecsDedicatedHostClusterId5 = clusterIds.then(clusterIds => clusterIds.clusters?[0]?.id);
Coming soon!
Using getEcsDedicatedHostClusters
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 getEcsDedicatedHostClusters(args: GetEcsDedicatedHostClustersArgs, opts?: InvokeOptions): Promise<GetEcsDedicatedHostClustersResult>
function getEcsDedicatedHostClustersOutput(args: GetEcsDedicatedHostClustersOutputArgs, opts?: InvokeOptions): Output<GetEcsDedicatedHostClustersResult>
def get_ecs_dedicated_host_clusters(dedicated_host_cluster_ids: Optional[Sequence[str]] = None,
dedicated_host_cluster_name: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None,
zone_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetEcsDedicatedHostClustersResult
def get_ecs_dedicated_host_clusters_output(dedicated_host_cluster_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
dedicated_host_cluster_name: 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,
tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
zone_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetEcsDedicatedHostClustersResult]
func GetEcsDedicatedHostClusters(ctx *Context, args *GetEcsDedicatedHostClustersArgs, opts ...InvokeOption) (*GetEcsDedicatedHostClustersResult, error)
func GetEcsDedicatedHostClustersOutput(ctx *Context, args *GetEcsDedicatedHostClustersOutputArgs, opts ...InvokeOption) GetEcsDedicatedHostClustersResultOutput
> Note: This function is named GetEcsDedicatedHostClusters
in the Go SDK.
public static class GetEcsDedicatedHostClusters
{
public static Task<GetEcsDedicatedHostClustersResult> InvokeAsync(GetEcsDedicatedHostClustersArgs args, InvokeOptions? opts = null)
public static Output<GetEcsDedicatedHostClustersResult> Invoke(GetEcsDedicatedHostClustersInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetEcsDedicatedHostClustersResult> getEcsDedicatedHostClusters(GetEcsDedicatedHostClustersArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: alicloud:ecs/getEcsDedicatedHostClusters:getEcsDedicatedHostClusters
Arguments:
# Arguments dictionary
The following arguments are supported:
- Dedicated
Host List<string>Cluster Ids The IDs of dedicated host clusters.
- Dedicated
Host stringCluster Name The name of the dedicated host cluster.
- Ids List<string>
A list of Dedicated Host Cluster IDs.
- Name
Regex string A regex string to filter results by Dedicated Host Cluster name.
- Output
File string - Dictionary<string, object>
A mapping of tags to assign to the resource.
- Zone
Id string The zone ID of the dedicated host cluster.
- Dedicated
Host []stringCluster Ids The IDs of dedicated host clusters.
- Dedicated
Host stringCluster Name The name of the dedicated host cluster.
- Ids []string
A list of Dedicated Host Cluster IDs.
- Name
Regex string A regex string to filter results by Dedicated Host Cluster name.
- Output
File string - map[string]interface{}
A mapping of tags to assign to the resource.
- Zone
Id string The zone ID of the dedicated host cluster.
- dedicated
Host ListCluster Ids The IDs of dedicated host clusters.
- dedicated
Host StringCluster Name The name of the dedicated host cluster.
- ids
List
A list of Dedicated Host Cluster IDs.
- name
Regex String A regex string to filter results by Dedicated Host Cluster name.
- output
File String - Map
A mapping of tags to assign to the resource.
- zone
Id String The zone ID of the dedicated host cluster.
- dedicated
Host string[]Cluster Ids The IDs of dedicated host clusters.
- dedicated
Host stringCluster Name The name of the dedicated host cluster.
- ids string[]
A list of Dedicated Host Cluster IDs.
- name
Regex string A regex string to filter results by Dedicated Host Cluster name.
- output
File string - {[key: string]: any}
A mapping of tags to assign to the resource.
- zone
Id string The zone ID of the dedicated host cluster.
- dedicated_
host_ Sequence[str]cluster_ ids The IDs of dedicated host clusters.
- dedicated_
host_ strcluster_ name The name of the dedicated host cluster.
- ids Sequence[str]
A list of Dedicated Host Cluster IDs.
- name_
regex str A regex string to filter results by Dedicated Host Cluster name.
- output_
file str - Mapping[str, Any]
A mapping of tags to assign to the resource.
- zone_
id str The zone ID of the dedicated host cluster.
- dedicated
Host ListCluster Ids The IDs of dedicated host clusters.
- dedicated
Host StringCluster Name The name of the dedicated host cluster.
- ids
List
A list of Dedicated Host Cluster IDs.
- name
Regex String A regex string to filter results by Dedicated Host Cluster name.
- output
File String - Map
A mapping of tags to assign to the resource.
- zone
Id String The zone ID of the dedicated host cluster.
getEcsDedicatedHostClusters Result
The following output properties are available:
- Clusters
List<Pulumi.
Ali Cloud. Ecs. Outputs. Get Ecs Dedicated Host Clusters Cluster> - Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Dedicated
Host List<string>Cluster Ids - Dedicated
Host stringCluster Name - Name
Regex string - Output
File string - Dictionary<string, object>
- Zone
Id string
- Clusters
[]Get
Ecs Dedicated Host Clusters Cluster - Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Dedicated
Host []stringCluster Ids - Dedicated
Host stringCluster Name - Name
Regex string - Output
File string - map[string]interface{}
- Zone
Id string
- clusters
List
Ecs Dedicated Host Clusters Cluster> - id String
The provider-assigned unique ID for this managed resource.
- ids
List
- names
List
- dedicated
Host ListCluster Ids - dedicated
Host StringCluster Name - name
Regex String - output
File String - Map
- zone
Id String
- clusters
Get
Ecs Dedicated Host Clusters Cluster[] - id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- dedicated
Host string[]Cluster Ids - dedicated
Host stringCluster Name - name
Regex string - output
File string - {[key: string]: any}
- zone
Id string
- clusters
Sequence[Get
Ecs Dedicated Host Clusters Cluster] - id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- dedicated_
host_ Sequence[str]cluster_ ids - dedicated_
host_ strcluster_ name - name_
regex str - output_
file str - Mapping[str, Any]
- zone_
id str
- clusters
List
- id String
The provider-assigned unique ID for this managed resource.
- ids
List
- names
List
- dedicated
Host ListCluster Ids - dedicated
Host StringCluster Name - name
Regex String - output
File String - Map
- zone
Id String
Supporting Types
GetEcsDedicatedHostClustersCluster
- Dedicated
Host List<Pulumi.Cluster Capacities Ali Cloud. Ecs. Inputs. Get Ecs Dedicated Host Clusters Cluster Dedicated Host Cluster Capacity> The capacity of the dedicated host cluster.
- Dedicated
Host stringCluster Id The ID of the dedicated host cluster.
- Dedicated
Host stringCluster Name The name of the dedicated host cluster.
- Dedicated
Host List<string>Ids The IDs of dedicated hosts in the dedicated host cluster.
- Description string
The description of the dedicated host cluster.
- Id string
The ID of the Dedicated Host Cluster.
- Resource
Group stringId The ID of the resource group to which the dedicated host cluster belongs.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Zone
Id string The zone ID of the dedicated host cluster.
- Dedicated
Host []GetCluster Capacities Ecs Dedicated Host Clusters Cluster Dedicated Host Cluster Capacity The capacity of the dedicated host cluster.
- Dedicated
Host stringCluster Id The ID of the dedicated host cluster.
- Dedicated
Host stringCluster Name The name of the dedicated host cluster.
- Dedicated
Host []stringIds The IDs of dedicated hosts in the dedicated host cluster.
- Description string
The description of the dedicated host cluster.
- Id string
The ID of the Dedicated Host Cluster.
- Resource
Group stringId The ID of the resource group to which the dedicated host cluster belongs.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Zone
Id string The zone ID of the dedicated host cluster.
- dedicated
Host ListCluster Capacities Ecs Dedicated Host Clusters Cluster Dedicated Host Cluster Capacity> The capacity of the dedicated host cluster.
- dedicated
Host StringCluster Id The ID of the dedicated host cluster.
- dedicated
Host StringCluster Name The name of the dedicated host cluster.
- dedicated
Host ListIds The IDs of dedicated hosts in the dedicated host cluster.
- description String
The description of the dedicated host cluster.
- id String
The ID of the Dedicated Host Cluster.
- resource
Group StringId The ID of the resource group to which the dedicated host cluster belongs.
- Map
A mapping of tags to assign to the resource.
- zone
Id String The zone ID of the dedicated host cluster.
- dedicated
Host GetCluster Capacities Ecs Dedicated Host Clusters Cluster Dedicated Host Cluster Capacity[] The capacity of the dedicated host cluster.
- dedicated
Host stringCluster Id The ID of the dedicated host cluster.
- dedicated
Host stringCluster Name The name of the dedicated host cluster.
- dedicated
Host string[]Ids The IDs of dedicated hosts in the dedicated host cluster.
- description string
The description of the dedicated host cluster.
- id string
The ID of the Dedicated Host Cluster.
- resource
Group stringId The ID of the resource group to which the dedicated host cluster belongs.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- zone
Id string The zone ID of the dedicated host cluster.
- dedicated_
host_ Sequence[Getcluster_ capacities Ecs Dedicated Host Clusters Cluster Dedicated Host Cluster Capacity] The capacity of the dedicated host cluster.
- dedicated_
host_ strcluster_ id The ID of the dedicated host cluster.
- dedicated_
host_ strcluster_ name The name of the dedicated host cluster.
- dedicated_
host_ Sequence[str]ids The IDs of dedicated hosts in the dedicated host cluster.
- description str
The description of the dedicated host cluster.
- id str
The ID of the Dedicated Host Cluster.
- resource_
group_ strid The ID of the resource group to which the dedicated host cluster belongs.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- zone_
id str The zone ID of the dedicated host cluster.
- dedicated
Host ListCluster Capacities The capacity of the dedicated host cluster.
- dedicated
Host StringCluster Id The ID of the dedicated host cluster.
- dedicated
Host StringCluster Name The name of the dedicated host cluster.
- dedicated
Host ListIds The IDs of dedicated hosts in the dedicated host cluster.
- description String
The description of the dedicated host cluster.
- id String
The ID of the Dedicated Host Cluster.
- resource
Group StringId The ID of the resource group to which the dedicated host cluster belongs.
- Map
A mapping of tags to assign to the resource.
- zone
Id String The zone ID of the dedicated host cluster.
GetEcsDedicatedHostClustersClusterDedicatedHostClusterCapacity
- Available
Memory int The available memory size. Unit:
GiB
.- Available
Vcpus int The number of available vCPUs.
- Local
Storage List<Pulumi.Capacities Ali Cloud. Ecs. Inputs. Get Ecs Dedicated Host Clusters Cluster Dedicated Host Cluster Capacity Local Storage Capacity> The local storage.
- Total
Memory int The total memory size. Unit:
GiB
.- Total
Vcpus int The total number of vCPUs.
- Available
Memory int The available memory size. Unit:
GiB
.- Available
Vcpus int The number of available vCPUs.
- Local
Storage []GetCapacities Ecs Dedicated Host Clusters Cluster Dedicated Host Cluster Capacity Local Storage Capacity The local storage.
- Total
Memory int The total memory size. Unit:
GiB
.- Total
Vcpus int The total number of vCPUs.
- available
Memory Integer The available memory size. Unit:
GiB
.- available
Vcpus Integer The number of available vCPUs.
- local
Storage ListCapacities Ecs Dedicated Host Clusters Cluster Dedicated Host Cluster Capacity Local Storage Capacity> The local storage.
- total
Memory Integer The total memory size. Unit:
GiB
.- total
Vcpus Integer The total number of vCPUs.
- available
Memory number The available memory size. Unit:
GiB
.- available
Vcpus number The number of available vCPUs.
- local
Storage GetCapacities Ecs Dedicated Host Clusters Cluster Dedicated Host Cluster Capacity Local Storage Capacity[] The local storage.
- total
Memory number The total memory size. Unit:
GiB
.- total
Vcpus number The total number of vCPUs.
- available_
memory int The available memory size. Unit:
GiB
.- available_
vcpus int The number of available vCPUs.
- local_
storage_ Sequence[Getcapacities Ecs Dedicated Host Clusters Cluster Dedicated Host Cluster Capacity Local Storage Capacity] The local storage.
- total_
memory int The total memory size. Unit:
GiB
.- total_
vcpus int The total number of vCPUs.
- available
Memory Number The available memory size. Unit:
GiB
.- available
Vcpus Number The number of available vCPUs.
- local
Storage ListCapacities The local storage.
- total
Memory Number The total memory size. Unit:
GiB
.- total
Vcpus Number The total number of vCPUs.
GetEcsDedicatedHostClustersClusterDedicatedHostClusterCapacityLocalStorageCapacity
- Available
Disk int The available capacity of the local disk. Unit:
GiB
.- Data
Disk stringCategory The category of the data disk. Valid values:
cloud
,cloud_efficiency
,cloud_ssd
,ephemeral_ssd
,cloud_essd
.- Total
Disk int The total capacity of the local disk. Unit:
GiB
.
- Available
Disk int The available capacity of the local disk. Unit:
GiB
.- Data
Disk stringCategory The category of the data disk. Valid values:
cloud
,cloud_efficiency
,cloud_ssd
,ephemeral_ssd
,cloud_essd
.- Total
Disk int The total capacity of the local disk. Unit:
GiB
.
- available
Disk Integer The available capacity of the local disk. Unit:
GiB
.- data
Disk StringCategory The category of the data disk. Valid values:
cloud
,cloud_efficiency
,cloud_ssd
,ephemeral_ssd
,cloud_essd
.- total
Disk Integer The total capacity of the local disk. Unit:
GiB
.
- available
Disk number The available capacity of the local disk. Unit:
GiB
.- data
Disk stringCategory The category of the data disk. Valid values:
cloud
,cloud_efficiency
,cloud_ssd
,ephemeral_ssd
,cloud_essd
.- total
Disk number The total capacity of the local disk. Unit:
GiB
.
- available_
disk int The available capacity of the local disk. Unit:
GiB
.- data_
disk_ strcategory The category of the data disk. Valid values:
cloud
,cloud_efficiency
,cloud_ssd
,ephemeral_ssd
,cloud_essd
.- total_
disk int The total capacity of the local disk. Unit:
GiB
.
- available
Disk Number The available capacity of the local disk. Unit:
GiB
.- data
Disk StringCategory The category of the data disk. Valid values:
cloud
,cloud_efficiency
,cloud_ssd
,ephemeral_ssd
,cloud_essd
.- total
Disk Number The total capacity of the local disk. Unit:
GiB
.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.