get Dhcp Options Sets
This data source provides the Vpc Dhcp Options Sets of the current Alibaba Cloud user.
NOTE: Available in v1.134.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.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetDhcpOptionsSetsArgs;
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 = VpcFunctions.getDhcpOptionsSets(GetDhcpOptionsSetsArgs.builder()
.ids("example_value")
.build());
ctx.export("vpcDhcpOptionsSetId1", ids.applyValue(getDhcpOptionsSetsResult -> getDhcpOptionsSetsResult.sets()[0].id()));
final var nameRegex = VpcFunctions.getDhcpOptionsSets(GetDhcpOptionsSetsArgs.builder()
.nameRegex("^my-DhcpOptionsSet")
.build());
ctx.export("vpcDhcpOptionsSetId2", nameRegex.applyValue(getDhcpOptionsSetsResult -> getDhcpOptionsSetsResult.sets()[0].id()));
final var dhcpOptionsSetName = VpcFunctions.getDhcpOptionsSets(GetDhcpOptionsSetsArgs.builder()
.dhcpOptionsSetName("my-DhcpOptionsSet")
.build());
ctx.export("vpcDhcpOptionsSetId3", dhcpOptionsSetName.applyValue(getDhcpOptionsSetsResult -> getDhcpOptionsSetsResult.sets()[0].id()));
final var domainName = VpcFunctions.getDhcpOptionsSets(GetDhcpOptionsSetsArgs.builder()
.ids("example_value")
.domainName("example.com")
.build());
ctx.export("vpcDhcpOptionsSetId4", domainName.applyValue(getDhcpOptionsSetsResult -> getDhcpOptionsSetsResult.sets()[0].id()));
final var status = VpcFunctions.getDhcpOptionsSets(GetDhcpOptionsSetsArgs.builder()
.ids("example_value")
.status("Available")
.build());
ctx.export("vpcDhcpOptionsSetId5", status.applyValue(getDhcpOptionsSetsResult -> getDhcpOptionsSetsResult.sets()[0].id()));
}
}
Return
A collection of values returned by getDhcpOptionsSets.
Parameters
A collection of arguments for invoking getDhcpOptionsSets.
Return
A collection of values returned by getDhcpOptionsSets.
See also
Parameters
The root domain, for example, example.com. After a DHCP options set is associated with a Virtual Private Cloud (VPC) network, the root domain in the DHCP options set is automatically synchronized to the ECS instances in the VPC network.
The root domain, for example, example.com. After a DHCP options set is associated with a Virtual Private Cloud (VPC) network, the root domain in the DHCP options set is automatically synchronized to the ECS instances in the VPC network.
A list of Dhcp Options Set IDs.
A regex string to filter results by Dhcp Options Set name.
File name where to save data source results (after running pulumi preview
).
The status of the DHCP options set. Valid values: Available
, InUse
or Pending
. Available
: The DHCP options set is available for use. InUse
: The DHCP options set is in use. Pending
: The DHCP options set is being configured.
Return
A collection of values returned by getDhcpOptionsSets.
See also
Parameters
Builder for com.pulumi.alicloud.vpc.kotlin.inputs.GetDhcpOptionsSetsPlainArgs.