1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. DcInternetAddressConfig
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.DcInternetAddressConfig

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a dc internet address config

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const exampleDcInternetAddress = new tencentcloud.DcInternetAddress("exampleDcInternetAddress", {
        maskLen: 30,
        addrType: 2,
        addrProto: 0,
    });
    const exampleDcInternetAddressConfig = new tencentcloud.DcInternetAddressConfig("exampleDcInternetAddressConfig", {
        instanceId: exampleDcInternetAddress.dcInternetAddressId,
        enable: true,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example_dc_internet_address = tencentcloud.DcInternetAddress("exampleDcInternetAddress",
        mask_len=30,
        addr_type=2,
        addr_proto=0)
    example_dc_internet_address_config = tencentcloud.DcInternetAddressConfig("exampleDcInternetAddressConfig",
        instance_id=example_dc_internet_address.dc_internet_address_id,
        enable=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleDcInternetAddress, err := tencentcloud.NewDcInternetAddress(ctx, "exampleDcInternetAddress", &tencentcloud.DcInternetAddressArgs{
    			MaskLen:   pulumi.Float64(30),
    			AddrType:  pulumi.Float64(2),
    			AddrProto: pulumi.Float64(0),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewDcInternetAddressConfig(ctx, "exampleDcInternetAddressConfig", &tencentcloud.DcInternetAddressConfigArgs{
    			InstanceId: exampleDcInternetAddress.DcInternetAddressId,
    			Enable:     pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleDcInternetAddress = new Tencentcloud.DcInternetAddress("exampleDcInternetAddress", new()
        {
            MaskLen = 30,
            AddrType = 2,
            AddrProto = 0,
        });
    
        var exampleDcInternetAddressConfig = new Tencentcloud.DcInternetAddressConfig("exampleDcInternetAddressConfig", new()
        {
            InstanceId = exampleDcInternetAddress.DcInternetAddressId,
            Enable = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.DcInternetAddress;
    import com.pulumi.tencentcloud.DcInternetAddressArgs;
    import com.pulumi.tencentcloud.DcInternetAddressConfig;
    import com.pulumi.tencentcloud.DcInternetAddressConfigArgs;
    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) {
            var exampleDcInternetAddress = new DcInternetAddress("exampleDcInternetAddress", DcInternetAddressArgs.builder()
                .maskLen(30)
                .addrType(2)
                .addrProto(0)
                .build());
    
            var exampleDcInternetAddressConfig = new DcInternetAddressConfig("exampleDcInternetAddressConfig", DcInternetAddressConfigArgs.builder()
                .instanceId(exampleDcInternetAddress.dcInternetAddressId())
                .enable(true)
                .build());
    
        }
    }
    
    resources:
      exampleDcInternetAddress:
        type: tencentcloud:DcInternetAddress
        properties:
          maskLen: 30
          addrType: 2
          addrProto: 0
      exampleDcInternetAddressConfig:
        type: tencentcloud:DcInternetAddressConfig
        properties:
          instanceId: ${exampleDcInternetAddress.dcInternetAddressId}
          enable: true
    

    Create DcInternetAddressConfig Resource

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

    Constructor syntax

    new DcInternetAddressConfig(name: string, args: DcInternetAddressConfigArgs, opts?: CustomResourceOptions);
    @overload
    def DcInternetAddressConfig(resource_name: str,
                                args: DcInternetAddressConfigArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def DcInternetAddressConfig(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                enable: Optional[bool] = None,
                                instance_id: Optional[str] = None,
                                dc_internet_address_config_id: Optional[str] = None)
    func NewDcInternetAddressConfig(ctx *Context, name string, args DcInternetAddressConfigArgs, opts ...ResourceOption) (*DcInternetAddressConfig, error)
    public DcInternetAddressConfig(string name, DcInternetAddressConfigArgs args, CustomResourceOptions? opts = null)
    public DcInternetAddressConfig(String name, DcInternetAddressConfigArgs args)
    public DcInternetAddressConfig(String name, DcInternetAddressConfigArgs args, CustomResourceOptions options)
    
    type: tencentcloud:DcInternetAddressConfig
    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 DcInternetAddressConfigArgs
    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 DcInternetAddressConfigArgs
    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 DcInternetAddressConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DcInternetAddressConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DcInternetAddressConfigArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    DcInternetAddressConfig 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 DcInternetAddressConfig resource accepts the following input properties:

    Enable bool
    whether enable internet address.
    InstanceId string
    internet public address id.
    DcInternetAddressConfigId string
    ID of the resource.
    Enable bool
    whether enable internet address.
    InstanceId string
    internet public address id.
    DcInternetAddressConfigId string
    ID of the resource.
    enable Boolean
    whether enable internet address.
    instanceId String
    internet public address id.
    dcInternetAddressConfigId String
    ID of the resource.
    enable boolean
    whether enable internet address.
    instanceId string
    internet public address id.
    dcInternetAddressConfigId string
    ID of the resource.
    enable bool
    whether enable internet address.
    instance_id str
    internet public address id.
    dc_internet_address_config_id str
    ID of the resource.
    enable Boolean
    whether enable internet address.
    instanceId String
    internet public address id.
    dcInternetAddressConfigId String
    ID of the resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DcInternetAddressConfig Resource

    Get an existing DcInternetAddressConfig 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?: DcInternetAddressConfigState, opts?: CustomResourceOptions): DcInternetAddressConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            dc_internet_address_config_id: Optional[str] = None,
            enable: Optional[bool] = None,
            instance_id: Optional[str] = None) -> DcInternetAddressConfig
    func GetDcInternetAddressConfig(ctx *Context, name string, id IDInput, state *DcInternetAddressConfigState, opts ...ResourceOption) (*DcInternetAddressConfig, error)
    public static DcInternetAddressConfig Get(string name, Input<string> id, DcInternetAddressConfigState? state, CustomResourceOptions? opts = null)
    public static DcInternetAddressConfig get(String name, Output<String> id, DcInternetAddressConfigState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:DcInternetAddressConfig    get:      id: ${id}
    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:
    DcInternetAddressConfigId string
    ID of the resource.
    Enable bool
    whether enable internet address.
    InstanceId string
    internet public address id.
    DcInternetAddressConfigId string
    ID of the resource.
    Enable bool
    whether enable internet address.
    InstanceId string
    internet public address id.
    dcInternetAddressConfigId String
    ID of the resource.
    enable Boolean
    whether enable internet address.
    instanceId String
    internet public address id.
    dcInternetAddressConfigId string
    ID of the resource.
    enable boolean
    whether enable internet address.
    instanceId string
    internet public address id.
    dc_internet_address_config_id str
    ID of the resource.
    enable bool
    whether enable internet address.
    instance_id str
    internet public address id.
    dcInternetAddressConfigId String
    ID of the resource.
    enable Boolean
    whether enable internet address.
    instanceId String
    internet public address id.

    Import

    dc internet address config can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/dcInternetAddressConfig:DcInternetAddressConfig example ipv4-5091pc5v
    

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

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack