Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.19.0 published on Friday, Mar 18, 2022 by Pulumi

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:

DedicatedHostClusterIds List<string>

The IDs of dedicated host clusters.

DedicatedHostClusterName string

The name of the dedicated host cluster.

Ids List<string>

A list of Dedicated Host Cluster IDs.

NameRegex string

A regex string to filter results by Dedicated Host Cluster name.

OutputFile string
Tags Dictionary<string, object>

A mapping of tags to assign to the resource.

ZoneId string

The zone ID of the dedicated host cluster.

DedicatedHostClusterIds []string

The IDs of dedicated host clusters.

DedicatedHostClusterName string

The name of the dedicated host cluster.

Ids []string

A list of Dedicated Host Cluster IDs.

NameRegex string

A regex string to filter results by Dedicated Host Cluster name.

OutputFile string
Tags map[string]interface{}

A mapping of tags to assign to the resource.

ZoneId string

The zone ID of the dedicated host cluster.

dedicatedHostClusterIds List

The IDs of dedicated host clusters.

dedicatedHostClusterName String

The name of the dedicated host cluster.

ids List

A list of Dedicated Host Cluster IDs.

nameRegex String

A regex string to filter results by Dedicated Host Cluster name.

outputFile String
tags Map

A mapping of tags to assign to the resource.

zoneId String

The zone ID of the dedicated host cluster.

dedicatedHostClusterIds string[]

The IDs of dedicated host clusters.

dedicatedHostClusterName string

The name of the dedicated host cluster.

ids string[]

A list of Dedicated Host Cluster IDs.

nameRegex string

A regex string to filter results by Dedicated Host Cluster name.

outputFile string
tags {[key: string]: any}

A mapping of tags to assign to the resource.

zoneId string

The zone ID of the dedicated host cluster.

dedicated_host_cluster_ids Sequence[str]

The IDs of dedicated host clusters.

dedicated_host_cluster_name str

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
tags Mapping[str, Any]

A mapping of tags to assign to the resource.

zone_id str

The zone ID of the dedicated host cluster.

dedicatedHostClusterIds List

The IDs of dedicated host clusters.

dedicatedHostClusterName String

The name of the dedicated host cluster.

ids List

A list of Dedicated Host Cluster IDs.

nameRegex String

A regex string to filter results by Dedicated Host Cluster name.

outputFile String
tags Map

A mapping of tags to assign to the resource.

zoneId String

The zone ID of the dedicated host cluster.

getEcsDedicatedHostClusters Result

The following output properties are available:

Clusters List<Pulumi.AliCloud.Ecs.Outputs.GetEcsDedicatedHostClustersCluster>
Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Names List<string>
DedicatedHostClusterIds List<string>
DedicatedHostClusterName string
NameRegex string
OutputFile string
Tags Dictionary<string, object>
ZoneId string
Clusters []GetEcsDedicatedHostClustersCluster
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Names []string
DedicatedHostClusterIds []string
DedicatedHostClusterName string
NameRegex string
OutputFile string
Tags map[string]interface{}
ZoneId string
clusters ListEcsDedicatedHostClustersCluster>
id String

The provider-assigned unique ID for this managed resource.

ids List
names List
dedicatedHostClusterIds List
dedicatedHostClusterName String
nameRegex String
outputFile String
tags Map
zoneId String
clusters GetEcsDedicatedHostClustersCluster[]
id string

The provider-assigned unique ID for this managed resource.

ids string[]
names string[]
dedicatedHostClusterIds string[]
dedicatedHostClusterName string
nameRegex string
outputFile string
tags {[key: string]: any}
zoneId string
clusters Sequence[GetEcsDedicatedHostClustersCluster]
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
names Sequence[str]
dedicated_host_cluster_ids Sequence[str]
dedicated_host_cluster_name str
name_regex str
output_file str
tags Mapping[str, Any]
zone_id str
clusters List
id String

The provider-assigned unique ID for this managed resource.

ids List
names List
dedicatedHostClusterIds List
dedicatedHostClusterName String
nameRegex String
outputFile String
tags Map
zoneId String

Supporting Types

GetEcsDedicatedHostClustersCluster

DedicatedHostClusterCapacities List<Pulumi.AliCloud.Ecs.Inputs.GetEcsDedicatedHostClustersClusterDedicatedHostClusterCapacity>

The capacity of the dedicated host cluster.

DedicatedHostClusterId string

The ID of the dedicated host cluster.

DedicatedHostClusterName string

The name of the dedicated host cluster.

DedicatedHostIds List<string>

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.

ResourceGroupId string

The ID of the resource group to which the dedicated host cluster belongs.

Tags Dictionary<string, object>

A mapping of tags to assign to the resource.

ZoneId string

The zone ID of the dedicated host cluster.

DedicatedHostClusterCapacities []GetEcsDedicatedHostClustersClusterDedicatedHostClusterCapacity

The capacity of the dedicated host cluster.

DedicatedHostClusterId string

The ID of the dedicated host cluster.

DedicatedHostClusterName string

The name of the dedicated host cluster.

DedicatedHostIds []string

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.

ResourceGroupId string

The ID of the resource group to which the dedicated host cluster belongs.

Tags map[string]interface{}

A mapping of tags to assign to the resource.

ZoneId string

The zone ID of the dedicated host cluster.

dedicatedHostClusterCapacities ListEcsDedicatedHostClustersClusterDedicatedHostClusterCapacity>

The capacity of the dedicated host cluster.

dedicatedHostClusterId String

The ID of the dedicated host cluster.

dedicatedHostClusterName String

The name of the dedicated host cluster.

dedicatedHostIds List

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.

resourceGroupId String

The ID of the resource group to which the dedicated host cluster belongs.

tags Map

A mapping of tags to assign to the resource.

zoneId String

The zone ID of the dedicated host cluster.

dedicatedHostClusterCapacities GetEcsDedicatedHostClustersClusterDedicatedHostClusterCapacity[]

The capacity of the dedicated host cluster.

dedicatedHostClusterId string

The ID of the dedicated host cluster.

dedicatedHostClusterName string

The name of the dedicated host cluster.

dedicatedHostIds string[]

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.

resourceGroupId string

The ID of the resource group to which the dedicated host cluster belongs.

tags {[key: string]: any}

A mapping of tags to assign to the resource.

zoneId string

The zone ID of the dedicated host cluster.

dedicated_host_cluster_capacities Sequence[GetEcsDedicatedHostClustersClusterDedicatedHostClusterCapacity]

The capacity of the dedicated host cluster.

dedicated_host_cluster_id str

The ID of the dedicated host cluster.

dedicated_host_cluster_name str

The name of the dedicated host cluster.

dedicated_host_ids Sequence[str]

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_id str

The ID of the resource group to which the dedicated host cluster belongs.

tags Mapping[str, Any]

A mapping of tags to assign to the resource.

zone_id str

The zone ID of the dedicated host cluster.

dedicatedHostClusterCapacities List

The capacity of the dedicated host cluster.

dedicatedHostClusterId String

The ID of the dedicated host cluster.

dedicatedHostClusterName String

The name of the dedicated host cluster.

dedicatedHostIds List

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.

resourceGroupId String

The ID of the resource group to which the dedicated host cluster belongs.

tags Map

A mapping of tags to assign to the resource.

zoneId String

The zone ID of the dedicated host cluster.

GetEcsDedicatedHostClustersClusterDedicatedHostClusterCapacity

AvailableMemory int

The available memory size. Unit: GiB.

AvailableVcpus int

The number of available vCPUs.

LocalStorageCapacities List<Pulumi.AliCloud.Ecs.Inputs.GetEcsDedicatedHostClustersClusterDedicatedHostClusterCapacityLocalStorageCapacity>

The local storage.

TotalMemory int

The total memory size. Unit: GiB.

TotalVcpus int

The total number of vCPUs.

AvailableMemory int

The available memory size. Unit: GiB.

AvailableVcpus int

The number of available vCPUs.

LocalStorageCapacities []GetEcsDedicatedHostClustersClusterDedicatedHostClusterCapacityLocalStorageCapacity

The local storage.

TotalMemory int

The total memory size. Unit: GiB.

TotalVcpus int

The total number of vCPUs.

availableMemory Integer

The available memory size. Unit: GiB.

availableVcpus Integer

The number of available vCPUs.

localStorageCapacities ListEcsDedicatedHostClustersClusterDedicatedHostClusterCapacityLocalStorageCapacity>

The local storage.

totalMemory Integer

The total memory size. Unit: GiB.

totalVcpus Integer

The total number of vCPUs.

availableMemory number

The available memory size. Unit: GiB.

availableVcpus number

The number of available vCPUs.

localStorageCapacities GetEcsDedicatedHostClustersClusterDedicatedHostClusterCapacityLocalStorageCapacity[]

The local storage.

totalMemory number

The total memory size. Unit: GiB.

totalVcpus 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_capacities Sequence[GetEcsDedicatedHostClustersClusterDedicatedHostClusterCapacityLocalStorageCapacity]

The local storage.

total_memory int

The total memory size. Unit: GiB.

total_vcpus int

The total number of vCPUs.

availableMemory Number

The available memory size. Unit: GiB.

availableVcpus Number

The number of available vCPUs.

localStorageCapacities List

The local storage.

totalMemory Number

The total memory size. Unit: GiB.

totalVcpus Number

The total number of vCPUs.

GetEcsDedicatedHostClustersClusterDedicatedHostClusterCapacityLocalStorageCapacity

AvailableDisk int

The available capacity of the local disk. Unit: GiB.

DataDiskCategory string

The category of the data disk. Valid values:cloud, cloud_efficiency, cloud_ssd, ephemeral_ssd, cloud_essd.

TotalDisk int

The total capacity of the local disk. Unit: GiB.

AvailableDisk int

The available capacity of the local disk. Unit: GiB.

DataDiskCategory string

The category of the data disk. Valid values:cloud, cloud_efficiency, cloud_ssd, ephemeral_ssd, cloud_essd.

TotalDisk int

The total capacity of the local disk. Unit: GiB.

availableDisk Integer

The available capacity of the local disk. Unit: GiB.

dataDiskCategory String

The category of the data disk. Valid values:cloud, cloud_efficiency, cloud_ssd, ephemeral_ssd, cloud_essd.

totalDisk Integer

The total capacity of the local disk. Unit: GiB.

availableDisk number

The available capacity of the local disk. Unit: GiB.

dataDiskCategory string

The category of the data disk. Valid values:cloud, cloud_efficiency, cloud_ssd, ephemeral_ssd, cloud_essd.

totalDisk number

The total capacity of the local disk. Unit: GiB.

available_disk int

The available capacity of the local disk. Unit: GiB.

data_disk_category str

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.

availableDisk Number

The available capacity of the local disk. Unit: GiB.

dataDiskCategory String

The category of the data disk. Valid values:cloud, cloud_efficiency, cloud_ssd, ephemeral_ssd, cloud_essd.

totalDisk 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.