get Dedicated Hosts
This data source provides the Cddc Dedicated Hosts of the current Alibaba Cloud user.
NOTE: Available in v1.147.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.cddc.CddcFunctions;
import com.pulumi.alicloud.cddc.inputs.GetDedicatedHostsArgs;
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 = CddcFunctions.getDedicatedHosts(GetDedicatedHostsArgs.builder()
.dedicatedHostGroupId("example_value")
.ids(
"example_value-1",
"example_value-2")
.build());
ctx.export("cddcDedicatedHostId1", ids.applyValue(getDedicatedHostsResult -> getDedicatedHostsResult.hosts()[0].id()));
final var status = CddcFunctions.getDedicatedHosts(GetDedicatedHostsArgs.builder()
.dedicatedHostGroupId("example_value")
.ids(
"example_value-1",
"example_value-2")
.status("1")
.build());
ctx.export("cddcDedicatedHostId2", status.applyValue(getDedicatedHostsResult -> getDedicatedHostsResult.hosts()[0].id()));
final var zoneId = CddcFunctions.getDedicatedHosts(GetDedicatedHostsArgs.builder()
.dedicatedHostGroupId("example_value")
.ids(
"example_value-1",
"example_value-2")
.zoneId("example_value")
.build());
ctx.export("cddcDedicatedHostId3", zoneId.applyValue(getDedicatedHostsResult -> getDedicatedHostsResult.hosts()[0].id()));
final var allocationStatus = CddcFunctions.getDedicatedHosts(GetDedicatedHostsArgs.builder()
.dedicatedHostGroupId("example_value")
.ids(
"example_value-1",
"example_value-2")
.allocationStatus("Allocatable")
.build());
ctx.export("cddcDedicatedHostId4", allocationStatus.applyValue(getDedicatedHostsResult -> getDedicatedHostsResult.hosts()[0].id()));
final var hostType = CddcFunctions.getDedicatedHosts(GetDedicatedHostsArgs.builder()
.dedicatedHostGroupId("example_value")
.ids(
"example_value-1",
"example_value-2")
.hostType("dhg_cloud_ssd")
.build());
ctx.export("cddcDedicatedHostId5", hostType.applyValue(getDedicatedHostsResult -> getDedicatedHostsResult.hosts()[0].id()));
}
}
Return
A collection of values returned by getDedicatedHosts.
Parameters
A collection of arguments for invoking getDedicatedHosts.
Return
A collection of values returned by getDedicatedHosts.
See also
Parameters
Specifies whether instances can be created on the host. Valid values: 1
or 0
. 1
: Instances can be created on the host. 0
: Instances cannot be created on the host.
The ID of the dedicated cluster in which the host is created.
Default to false
. Set it to true
can output more details about resource attributes.
The storage type of the host.
A list of Dedicated Host IDs.
The ID of the order.
File name where to save data source results (after running pulumi preview
).
The state of the host.
The tag of the resource.
The zone ID of the host.
Return
A collection of values returned by getDedicatedHosts.
See also
Parameters
Builder for com.pulumi.alicloud.cddc.kotlin.inputs.GetDedicatedHostsPlainArgs.