1. Packages
  2. Alicloud Provider
  3. API Docs
  4. vpc
  5. DhcpOptionsSet
Alibaba Cloud v3.65.0 published on Monday, Nov 4, 2024 by Pulumi

alicloud.vpc.DhcpOptionsSet

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.65.0 published on Monday, Nov 4, 2024 by Pulumi

    Provides a VPC Dhcp Options Set resource. DHCP option set.

    For information about VPC Dhcp Options Set and how to use it, see What is Dhcp Options Set.

    NOTE: Available since v1.134.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const domain = config.get("domain") || "terraform-example.com";
    const example = new alicloud.vpc.DhcpOptionsSet("example", {
        dhcpOptionsSetName: name,
        dhcpOptionsSetDescription: name,
        domainName: domain,
        domainNameServers: "100.100.2.136",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    domain = config.get("domain")
    if domain is None:
        domain = "terraform-example.com"
    example = alicloud.vpc.DhcpOptionsSet("example",
        dhcp_options_set_name=name,
        dhcp_options_set_description=name,
        domain_name=domain,
        domain_name_servers="100.100.2.136")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		domain := "terraform-example.com"
    		if param := cfg.Get("domain"); param != "" {
    			domain = param
    		}
    		_, err := vpc.NewDhcpOptionsSet(ctx, "example", &vpc.DhcpOptionsSetArgs{
    			DhcpOptionsSetName:        pulumi.String(name),
    			DhcpOptionsSetDescription: pulumi.String(name),
    			DomainName:                pulumi.String(domain),
    			DomainNameServers:         pulumi.String("100.100.2.136"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var domain = config.Get("domain") ?? "terraform-example.com";
        var example = new AliCloud.Vpc.DhcpOptionsSet("example", new()
        {
            DhcpOptionsSetName = name,
            DhcpOptionsSetDescription = name,
            DomainName = domain,
            DomainNameServers = "100.100.2.136",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.vpc.DhcpOptionsSet;
    import com.pulumi.alicloud.vpc.DhcpOptionsSetArgs;
    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 config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            final var domain = config.get("domain").orElse("terraform-example.com");
            var example = new DhcpOptionsSet("example", DhcpOptionsSetArgs.builder()
                .dhcpOptionsSetName(name)
                .dhcpOptionsSetDescription(name)
                .domainName(domain)
                .domainNameServers("100.100.2.136")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
      domain:
        type: string
        default: terraform-example.com
    resources:
      example:
        type: alicloud:vpc:DhcpOptionsSet
        properties:
          dhcpOptionsSetName: ${name}
          dhcpOptionsSetDescription: ${name}
          domainName: ${domain}
          domainNameServers: 100.100.2.136
    

    Create DhcpOptionsSet Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DhcpOptionsSet(name: string, args?: DhcpOptionsSetArgs, opts?: CustomResourceOptions);
    @overload
    def DhcpOptionsSet(resource_name: str,
                       args: Optional[DhcpOptionsSetArgs] = None,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def DhcpOptionsSet(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       associate_vpcs: Optional[Sequence[DhcpOptionsSetAssociateVpcArgs]] = None,
                       dhcp_options_set_description: Optional[str] = None,
                       dhcp_options_set_name: Optional[str] = None,
                       domain_name: Optional[str] = None,
                       domain_name_servers: Optional[str] = None,
                       dry_run: Optional[bool] = None,
                       ipv6_lease_time: Optional[str] = None,
                       lease_time: Optional[str] = None,
                       resource_group_id: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None)
    func NewDhcpOptionsSet(ctx *Context, name string, args *DhcpOptionsSetArgs, opts ...ResourceOption) (*DhcpOptionsSet, error)
    public DhcpOptionsSet(string name, DhcpOptionsSetArgs? args = null, CustomResourceOptions? opts = null)
    public DhcpOptionsSet(String name, DhcpOptionsSetArgs args)
    public DhcpOptionsSet(String name, DhcpOptionsSetArgs args, CustomResourceOptions options)
    
    type: alicloud:vpc:DhcpOptionsSet
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DhcpOptionsSetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DhcpOptionsSetArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DhcpOptionsSetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DhcpOptionsSetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DhcpOptionsSetArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var dhcpOptionsSetResource = new AliCloud.Vpc.DhcpOptionsSet("dhcpOptionsSetResource", new()
    {
        DhcpOptionsSetDescription = "string",
        DhcpOptionsSetName = "string",
        DomainName = "string",
        DomainNameServers = "string",
        DryRun = false,
        Ipv6LeaseTime = "string",
        LeaseTime = "string",
        ResourceGroupId = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := vpc.NewDhcpOptionsSet(ctx, "dhcpOptionsSetResource", &vpc.DhcpOptionsSetArgs{
    	DhcpOptionsSetDescription: pulumi.String("string"),
    	DhcpOptionsSetName:        pulumi.String("string"),
    	DomainName:                pulumi.String("string"),
    	DomainNameServers:         pulumi.String("string"),
    	DryRun:                    pulumi.Bool(false),
    	Ipv6LeaseTime:             pulumi.String("string"),
    	LeaseTime:                 pulumi.String("string"),
    	ResourceGroupId:           pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var dhcpOptionsSetResource = new DhcpOptionsSet("dhcpOptionsSetResource", DhcpOptionsSetArgs.builder()
        .dhcpOptionsSetDescription("string")
        .dhcpOptionsSetName("string")
        .domainName("string")
        .domainNameServers("string")
        .dryRun(false)
        .ipv6LeaseTime("string")
        .leaseTime("string")
        .resourceGroupId("string")
        .tags(Map.of("string", "string"))
        .build());
    
    dhcp_options_set_resource = alicloud.vpc.DhcpOptionsSet("dhcpOptionsSetResource",
        dhcp_options_set_description="string",
        dhcp_options_set_name="string",
        domain_name="string",
        domain_name_servers="string",
        dry_run=False,
        ipv6_lease_time="string",
        lease_time="string",
        resource_group_id="string",
        tags={
            "string": "string",
        })
    
    const dhcpOptionsSetResource = new alicloud.vpc.DhcpOptionsSet("dhcpOptionsSetResource", {
        dhcpOptionsSetDescription: "string",
        dhcpOptionsSetName: "string",
        domainName: "string",
        domainNameServers: "string",
        dryRun: false,
        ipv6LeaseTime: "string",
        leaseTime: "string",
        resourceGroupId: "string",
        tags: {
            string: "string",
        },
    });
    
    type: alicloud:vpc:DhcpOptionsSet
    properties:
        dhcpOptionsSetDescription: string
        dhcpOptionsSetName: string
        domainName: string
        domainNameServers: string
        dryRun: false
        ipv6LeaseTime: string
        leaseTime: string
        resourceGroupId: string
        tags:
            string: string
    

    DhcpOptionsSet Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The DhcpOptionsSet resource accepts the following input properties:

    AssociateVpcs List<Pulumi.AliCloud.Vpc.Inputs.DhcpOptionsSetAssociateVpc>
    Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc. See associate_vpcs below.

    Deprecated: Field 'associate_vpcs' has been deprecated from provider version 1.153.0. Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc.

    DhcpOptionsSetDescription string
    The description can be blank or contain 1 to 256 characters. It must start with a letter or Chinese character but cannot start with http:// or https://.
    DhcpOptionsSetName string
    The name must be 2 to 128 characters in length and can contain letters, Chinese characters, digits, underscores (_), and hyphens (-). It must start with a letter or a Chinese character.
    DomainName string
    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.
    DomainNameServers string
    The DNS server IP addresses. Up to four DNS server IP addresses can be specified. IP addresses must be separated with commas (,).Before you specify any DNS server IP address, all ECS instances in the associated VPC network use the IP addresses of the Alibaba Cloud DNS servers, which are 100.100.2.136 and 100.100.2.138.
    DryRun bool
    Whether to PreCheck only this request, value:

    • true: sends a check request and does not delete the DHCP option set. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request and directly deletes the DHCP option set after checking.
    Ipv6LeaseTime string
    The lease time of the IPv6 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    LeaseTime string
    The lease time of the IPv4 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    ResourceGroupId string
    The ID of the resource group.
    Tags Dictionary<string, string>
    Tags of the current resource.
    AssociateVpcs []DhcpOptionsSetAssociateVpcArgs
    Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc. See associate_vpcs below.

    Deprecated: Field 'associate_vpcs' has been deprecated from provider version 1.153.0. Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc.

    DhcpOptionsSetDescription string
    The description can be blank or contain 1 to 256 characters. It must start with a letter or Chinese character but cannot start with http:// or https://.
    DhcpOptionsSetName string
    The name must be 2 to 128 characters in length and can contain letters, Chinese characters, digits, underscores (_), and hyphens (-). It must start with a letter or a Chinese character.
    DomainName string
    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.
    DomainNameServers string
    The DNS server IP addresses. Up to four DNS server IP addresses can be specified. IP addresses must be separated with commas (,).Before you specify any DNS server IP address, all ECS instances in the associated VPC network use the IP addresses of the Alibaba Cloud DNS servers, which are 100.100.2.136 and 100.100.2.138.
    DryRun bool
    Whether to PreCheck only this request, value:

    • true: sends a check request and does not delete the DHCP option set. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request and directly deletes the DHCP option set after checking.
    Ipv6LeaseTime string
    The lease time of the IPv6 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    LeaseTime string
    The lease time of the IPv4 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    ResourceGroupId string
    The ID of the resource group.
    Tags map[string]string
    Tags of the current resource.
    associateVpcs List<DhcpOptionsSetAssociateVpc>
    Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc. See associate_vpcs below.

    Deprecated: Field 'associate_vpcs' has been deprecated from provider version 1.153.0. Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc.

    dhcpOptionsSetDescription String
    The description can be blank or contain 1 to 256 characters. It must start with a letter or Chinese character but cannot start with http:// or https://.
    dhcpOptionsSetName String
    The name must be 2 to 128 characters in length and can contain letters, Chinese characters, digits, underscores (_), and hyphens (-). It must start with a letter or a Chinese character.
    domainName String
    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.
    domainNameServers String
    The DNS server IP addresses. Up to four DNS server IP addresses can be specified. IP addresses must be separated with commas (,).Before you specify any DNS server IP address, all ECS instances in the associated VPC network use the IP addresses of the Alibaba Cloud DNS servers, which are 100.100.2.136 and 100.100.2.138.
    dryRun Boolean
    Whether to PreCheck only this request, value:

    • true: sends a check request and does not delete the DHCP option set. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request and directly deletes the DHCP option set after checking.
    ipv6LeaseTime String
    The lease time of the IPv6 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    leaseTime String
    The lease time of the IPv4 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    resourceGroupId String
    The ID of the resource group.
    tags Map<String,String>
    Tags of the current resource.
    associateVpcs DhcpOptionsSetAssociateVpc[]
    Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc. See associate_vpcs below.

    Deprecated: Field 'associate_vpcs' has been deprecated from provider version 1.153.0. Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc.

    dhcpOptionsSetDescription string
    The description can be blank or contain 1 to 256 characters. It must start with a letter or Chinese character but cannot start with http:// or https://.
    dhcpOptionsSetName string
    The name must be 2 to 128 characters in length and can contain letters, Chinese characters, digits, underscores (_), and hyphens (-). It must start with a letter or a Chinese character.
    domainName string
    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.
    domainNameServers string
    The DNS server IP addresses. Up to four DNS server IP addresses can be specified. IP addresses must be separated with commas (,).Before you specify any DNS server IP address, all ECS instances in the associated VPC network use the IP addresses of the Alibaba Cloud DNS servers, which are 100.100.2.136 and 100.100.2.138.
    dryRun boolean
    Whether to PreCheck only this request, value:

    • true: sends a check request and does not delete the DHCP option set. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request and directly deletes the DHCP option set after checking.
    ipv6LeaseTime string
    The lease time of the IPv6 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    leaseTime string
    The lease time of the IPv4 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    resourceGroupId string
    The ID of the resource group.
    tags {[key: string]: string}
    Tags of the current resource.
    associate_vpcs Sequence[DhcpOptionsSetAssociateVpcArgs]
    Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc. See associate_vpcs below.

    Deprecated: Field 'associate_vpcs' has been deprecated from provider version 1.153.0. Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc.

    dhcp_options_set_description str
    The description can be blank or contain 1 to 256 characters. It must start with a letter or Chinese character but cannot start with http:// or https://.
    dhcp_options_set_name str
    The name must be 2 to 128 characters in length and can contain letters, Chinese characters, digits, underscores (_), and hyphens (-). It must start with a letter or a Chinese character.
    domain_name str
    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.
    domain_name_servers str
    The DNS server IP addresses. Up to four DNS server IP addresses can be specified. IP addresses must be separated with commas (,).Before you specify any DNS server IP address, all ECS instances in the associated VPC network use the IP addresses of the Alibaba Cloud DNS servers, which are 100.100.2.136 and 100.100.2.138.
    dry_run bool
    Whether to PreCheck only this request, value:

    • true: sends a check request and does not delete the DHCP option set. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request and directly deletes the DHCP option set after checking.
    ipv6_lease_time str
    The lease time of the IPv6 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    lease_time str
    The lease time of the IPv4 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    resource_group_id str
    The ID of the resource group.
    tags Mapping[str, str]
    Tags of the current resource.
    associateVpcs List<Property Map>
    Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc. See associate_vpcs below.

    Deprecated: Field 'associate_vpcs' has been deprecated from provider version 1.153.0. Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc.

    dhcpOptionsSetDescription String
    The description can be blank or contain 1 to 256 characters. It must start with a letter or Chinese character but cannot start with http:// or https://.
    dhcpOptionsSetName String
    The name must be 2 to 128 characters in length and can contain letters, Chinese characters, digits, underscores (_), and hyphens (-). It must start with a letter or a Chinese character.
    domainName String
    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.
    domainNameServers String
    The DNS server IP addresses. Up to four DNS server IP addresses can be specified. IP addresses must be separated with commas (,).Before you specify any DNS server IP address, all ECS instances in the associated VPC network use the IP addresses of the Alibaba Cloud DNS servers, which are 100.100.2.136 and 100.100.2.138.
    dryRun Boolean
    Whether to PreCheck only this request, value:

    • true: sends a check request and does not delete the DHCP option set. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request and directly deletes the DHCP option set after checking.
    ipv6LeaseTime String
    The lease time of the IPv6 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    leaseTime String
    The lease time of the IPv4 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    resourceGroupId String
    The ID of the resource group.
    tags Map<String>
    Tags of the current resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DhcpOptionsSet resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    OwnerId int
    The ID of the account to which the DHCP options set belongs.
    Status string
    The status of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    OwnerId int
    The ID of the account to which the DHCP options set belongs.
    Status string
    The status of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    ownerId Integer
    The ID of the account to which the DHCP options set belongs.
    status String
    The status of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    ownerId number
    The ID of the account to which the DHCP options set belongs.
    status string
    The status of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    owner_id int
    The ID of the account to which the DHCP options set belongs.
    status str
    The status of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    ownerId Number
    The ID of the account to which the DHCP options set belongs.
    status String
    The status of the resource.

    Look up Existing DhcpOptionsSet Resource

    Get an existing DhcpOptionsSet resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DhcpOptionsSetState, opts?: CustomResourceOptions): DhcpOptionsSet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            associate_vpcs: Optional[Sequence[DhcpOptionsSetAssociateVpcArgs]] = None,
            dhcp_options_set_description: Optional[str] = None,
            dhcp_options_set_name: Optional[str] = None,
            domain_name: Optional[str] = None,
            domain_name_servers: Optional[str] = None,
            dry_run: Optional[bool] = None,
            ipv6_lease_time: Optional[str] = None,
            lease_time: Optional[str] = None,
            owner_id: Optional[int] = None,
            resource_group_id: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None) -> DhcpOptionsSet
    func GetDhcpOptionsSet(ctx *Context, name string, id IDInput, state *DhcpOptionsSetState, opts ...ResourceOption) (*DhcpOptionsSet, error)
    public static DhcpOptionsSet Get(string name, Input<string> id, DhcpOptionsSetState? state, CustomResourceOptions? opts = null)
    public static DhcpOptionsSet get(String name, Output<String> id, DhcpOptionsSetState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AssociateVpcs List<Pulumi.AliCloud.Vpc.Inputs.DhcpOptionsSetAssociateVpc>
    Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc. See associate_vpcs below.

    Deprecated: Field 'associate_vpcs' has been deprecated from provider version 1.153.0. Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc.

    DhcpOptionsSetDescription string
    The description can be blank or contain 1 to 256 characters. It must start with a letter or Chinese character but cannot start with http:// or https://.
    DhcpOptionsSetName string
    The name must be 2 to 128 characters in length and can contain letters, Chinese characters, digits, underscores (_), and hyphens (-). It must start with a letter or a Chinese character.
    DomainName string
    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.
    DomainNameServers string
    The DNS server IP addresses. Up to four DNS server IP addresses can be specified. IP addresses must be separated with commas (,).Before you specify any DNS server IP address, all ECS instances in the associated VPC network use the IP addresses of the Alibaba Cloud DNS servers, which are 100.100.2.136 and 100.100.2.138.
    DryRun bool
    Whether to PreCheck only this request, value:

    • true: sends a check request and does not delete the DHCP option set. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request and directly deletes the DHCP option set after checking.
    Ipv6LeaseTime string
    The lease time of the IPv6 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    LeaseTime string
    The lease time of the IPv4 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    OwnerId int
    The ID of the account to which the DHCP options set belongs.
    ResourceGroupId string
    The ID of the resource group.
    Status string
    The status of the resource.
    Tags Dictionary<string, string>
    Tags of the current resource.
    AssociateVpcs []DhcpOptionsSetAssociateVpcArgs
    Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc. See associate_vpcs below.

    Deprecated: Field 'associate_vpcs' has been deprecated from provider version 1.153.0. Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc.

    DhcpOptionsSetDescription string
    The description can be blank or contain 1 to 256 characters. It must start with a letter or Chinese character but cannot start with http:// or https://.
    DhcpOptionsSetName string
    The name must be 2 to 128 characters in length and can contain letters, Chinese characters, digits, underscores (_), and hyphens (-). It must start with a letter or a Chinese character.
    DomainName string
    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.
    DomainNameServers string
    The DNS server IP addresses. Up to four DNS server IP addresses can be specified. IP addresses must be separated with commas (,).Before you specify any DNS server IP address, all ECS instances in the associated VPC network use the IP addresses of the Alibaba Cloud DNS servers, which are 100.100.2.136 and 100.100.2.138.
    DryRun bool
    Whether to PreCheck only this request, value:

    • true: sends a check request and does not delete the DHCP option set. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request and directly deletes the DHCP option set after checking.
    Ipv6LeaseTime string
    The lease time of the IPv6 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    LeaseTime string
    The lease time of the IPv4 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    OwnerId int
    The ID of the account to which the DHCP options set belongs.
    ResourceGroupId string
    The ID of the resource group.
    Status string
    The status of the resource.
    Tags map[string]string
    Tags of the current resource.
    associateVpcs List<DhcpOptionsSetAssociateVpc>
    Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc. See associate_vpcs below.

    Deprecated: Field 'associate_vpcs' has been deprecated from provider version 1.153.0. Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc.

    dhcpOptionsSetDescription String
    The description can be blank or contain 1 to 256 characters. It must start with a letter or Chinese character but cannot start with http:// or https://.
    dhcpOptionsSetName String
    The name must be 2 to 128 characters in length and can contain letters, Chinese characters, digits, underscores (_), and hyphens (-). It must start with a letter or a Chinese character.
    domainName String
    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.
    domainNameServers String
    The DNS server IP addresses. Up to four DNS server IP addresses can be specified. IP addresses must be separated with commas (,).Before you specify any DNS server IP address, all ECS instances in the associated VPC network use the IP addresses of the Alibaba Cloud DNS servers, which are 100.100.2.136 and 100.100.2.138.
    dryRun Boolean
    Whether to PreCheck only this request, value:

    • true: sends a check request and does not delete the DHCP option set. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request and directly deletes the DHCP option set after checking.
    ipv6LeaseTime String
    The lease time of the IPv6 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    leaseTime String
    The lease time of the IPv4 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    ownerId Integer
    The ID of the account to which the DHCP options set belongs.
    resourceGroupId String
    The ID of the resource group.
    status String
    The status of the resource.
    tags Map<String,String>
    Tags of the current resource.
    associateVpcs DhcpOptionsSetAssociateVpc[]
    Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc. See associate_vpcs below.

    Deprecated: Field 'associate_vpcs' has been deprecated from provider version 1.153.0. Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc.

    dhcpOptionsSetDescription string
    The description can be blank or contain 1 to 256 characters. It must start with a letter or Chinese character but cannot start with http:// or https://.
    dhcpOptionsSetName string
    The name must be 2 to 128 characters in length and can contain letters, Chinese characters, digits, underscores (_), and hyphens (-). It must start with a letter or a Chinese character.
    domainName string
    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.
    domainNameServers string
    The DNS server IP addresses. Up to four DNS server IP addresses can be specified. IP addresses must be separated with commas (,).Before you specify any DNS server IP address, all ECS instances in the associated VPC network use the IP addresses of the Alibaba Cloud DNS servers, which are 100.100.2.136 and 100.100.2.138.
    dryRun boolean
    Whether to PreCheck only this request, value:

    • true: sends a check request and does not delete the DHCP option set. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request and directly deletes the DHCP option set after checking.
    ipv6LeaseTime string
    The lease time of the IPv6 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    leaseTime string
    The lease time of the IPv4 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    ownerId number
    The ID of the account to which the DHCP options set belongs.
    resourceGroupId string
    The ID of the resource group.
    status string
    The status of the resource.
    tags {[key: string]: string}
    Tags of the current resource.
    associate_vpcs Sequence[DhcpOptionsSetAssociateVpcArgs]
    Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc. See associate_vpcs below.

    Deprecated: Field 'associate_vpcs' has been deprecated from provider version 1.153.0. Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc.

    dhcp_options_set_description str
    The description can be blank or contain 1 to 256 characters. It must start with a letter or Chinese character but cannot start with http:// or https://.
    dhcp_options_set_name str
    The name must be 2 to 128 characters in length and can contain letters, Chinese characters, digits, underscores (_), and hyphens (-). It must start with a letter or a Chinese character.
    domain_name str
    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.
    domain_name_servers str
    The DNS server IP addresses. Up to four DNS server IP addresses can be specified. IP addresses must be separated with commas (,).Before you specify any DNS server IP address, all ECS instances in the associated VPC network use the IP addresses of the Alibaba Cloud DNS servers, which are 100.100.2.136 and 100.100.2.138.
    dry_run bool
    Whether to PreCheck only this request, value:

    • true: sends a check request and does not delete the DHCP option set. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request and directly deletes the DHCP option set after checking.
    ipv6_lease_time str
    The lease time of the IPv6 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    lease_time str
    The lease time of the IPv4 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    owner_id int
    The ID of the account to which the DHCP options set belongs.
    resource_group_id str
    The ID of the resource group.
    status str
    The status of the resource.
    tags Mapping[str, str]
    Tags of the current resource.
    associateVpcs List<Property Map>
    Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc. See associate_vpcs below.

    Deprecated: Field 'associate_vpcs' has been deprecated from provider version 1.153.0. Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc.

    dhcpOptionsSetDescription String
    The description can be blank or contain 1 to 256 characters. It must start with a letter or Chinese character but cannot start with http:// or https://.
    dhcpOptionsSetName String
    The name must be 2 to 128 characters in length and can contain letters, Chinese characters, digits, underscores (_), and hyphens (-). It must start with a letter or a Chinese character.
    domainName String
    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.
    domainNameServers String
    The DNS server IP addresses. Up to four DNS server IP addresses can be specified. IP addresses must be separated with commas (,).Before you specify any DNS server IP address, all ECS instances in the associated VPC network use the IP addresses of the Alibaba Cloud DNS servers, which are 100.100.2.136 and 100.100.2.138.
    dryRun Boolean
    Whether to PreCheck only this request, value:

    • true: sends a check request and does not delete the DHCP option set. Check items include whether required parameters are filled in, request format, and restrictions. If the check fails, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
    • false (default): Sends a normal request and directly deletes the DHCP option set after checking.
    ipv6LeaseTime String
    The lease time of the IPv6 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    leaseTime String
    The lease time of the IPv4 DHCP option set.When the lease time is set to hours: Unit: h. Value range: 24h ~ 1176h,87600h ~ 175200h. Default value: 87600h.When the lease time is set to day: Unit: d. Value range: 1d ~ 49d,3650d ~ 7300d. Default value: 3650d.
    ownerId Number
    The ID of the account to which the DHCP options set belongs.
    resourceGroupId String
    The ID of the resource group.
    status String
    The status of the resource.
    tags Map<String>
    Tags of the current resource.

    Supporting Types

    DhcpOptionsSetAssociateVpc, DhcpOptionsSetAssociateVpcArgs

    VpcId string
    The ID of the VPC network that is associated with the DHCP options set.
    AssociateStatus string
    The status of the VPC associated with the DHCP option set.
    VpcId string
    The ID of the VPC network that is associated with the DHCP options set.
    AssociateStatus string
    The status of the VPC associated with the DHCP option set.
    vpcId String
    The ID of the VPC network that is associated with the DHCP options set.
    associateStatus String
    The status of the VPC associated with the DHCP option set.
    vpcId string
    The ID of the VPC network that is associated with the DHCP options set.
    associateStatus string
    The status of the VPC associated with the DHCP option set.
    vpc_id str
    The ID of the VPC network that is associated with the DHCP options set.
    associate_status str
    The status of the VPC associated with the DHCP option set.
    vpcId String
    The ID of the VPC network that is associated with the DHCP options set.
    associateStatus String
    The status of the VPC associated with the DHCP option set.

    Import

    VPC Dhcp Options Set can be imported using the id, e.g.

    $ pulumi import alicloud:vpc/dhcpOptionsSet:DhcpOptionsSet example <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.65.0 published on Monday, Nov 4, 2024 by Pulumi