get Dedicated Hosts
This data source provides a list of ECS Dedicated Hosts in an Alibaba Cloud account according to the specified filters.
NOTE: Available in v1.91.0+.
Example Usage
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.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 dedicatedHostsDs = EcsFunctions.getDedicatedHosts(GetDedicatedHostsArgs.builder()
.dedicatedHostType("ddh.g5")
.nameRegex("tf-testAcc")
.status("Available")
.build());
ctx.export("firstDedicatedHostsId", dedicatedHostsDs.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
The ID of ECS Dedicated Host.
The name of ECS Dedicated Host.
The type of the dedicated host.
A list of ECS Dedicated Host ids.
A regex string to filter results by the ECS Dedicated Host name.
The reason why the dedicated host resource is locked.
Save the result to the file.
The ID of the resource group to which the ECS Dedicated Host belongs.
The status of the ECS Dedicated Host. validate value: Available
, Creating
, PermanentFailure
, Released
, UnderAssessment
.
A mapping of tags to assign to the resource.
The zone ID of the ECS Dedicated Host.
Return
A collection of values returned by getDedicatedHosts.
See also
Parameters
Builder for com.pulumi.alicloud.ecs.kotlin.inputs.GetDedicatedHostsPlainArgs.