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

tencentcloud.NatRefreshNatDcRoute

Explore with Pulumi AI

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

    Provides a resource to create a vpc refresh_nat_dc_route

    Example Usage

    is True

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
    const eipExample = new tencentcloud.Eip("eipExample", {});
    const nat = new tencentcloud.NatGateway("nat", {
        vpcId: vpc.vpcId,
        maxConcurrent: 3000000,
        bandwidth: 500,
        assignedEipSets: [eipExample.publicIp],
    });
    const refreshNatDcRoute = new tencentcloud.NatRefreshNatDcRoute("refreshNatDcRoute", {
        natGatewayId: nat.natGatewayId,
        vpcId: vpc.vpcId,
        dryRun: true,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
    eip_example = tencentcloud.Eip("eipExample")
    nat = tencentcloud.NatGateway("nat",
        vpc_id=vpc.vpc_id,
        max_concurrent=3000000,
        bandwidth=500,
        assigned_eip_sets=[eip_example.public_ip])
    refresh_nat_dc_route = tencentcloud.NatRefreshNatDcRoute("refreshNatDcRoute",
        nat_gateway_id=nat.nat_gateway_id,
        vpc_id=vpc.vpc_id,
        dry_run=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 {
    		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
    			CidrBlock: pulumi.String("10.0.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		eipExample, err := tencentcloud.NewEip(ctx, "eipExample", nil)
    		if err != nil {
    			return err
    		}
    		nat, err := tencentcloud.NewNatGateway(ctx, "nat", &tencentcloud.NatGatewayArgs{
    			VpcId:         vpc.VpcId,
    			MaxConcurrent: pulumi.Float64(3000000),
    			Bandwidth:     pulumi.Float64(500),
    			AssignedEipSets: pulumi.StringArray{
    				eipExample.PublicIp,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewNatRefreshNatDcRoute(ctx, "refreshNatDcRoute", &tencentcloud.NatRefreshNatDcRouteArgs{
    			NatGatewayId: nat.NatGatewayId,
    			VpcId:        vpc.VpcId,
    			DryRun:       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 vpc = new Tencentcloud.Vpc("vpc", new()
        {
            CidrBlock = "10.0.0.0/16",
        });
    
        var eipExample = new Tencentcloud.Eip("eipExample");
    
        var nat = new Tencentcloud.NatGateway("nat", new()
        {
            VpcId = vpc.VpcId,
            MaxConcurrent = 3000000,
            Bandwidth = 500,
            AssignedEipSets = new[]
            {
                eipExample.PublicIp,
            },
        });
    
        var refreshNatDcRoute = new Tencentcloud.NatRefreshNatDcRoute("refreshNatDcRoute", new()
        {
            NatGatewayId = nat.NatGatewayId,
            VpcId = vpc.VpcId,
            DryRun = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.Vpc;
    import com.pulumi.tencentcloud.VpcArgs;
    import com.pulumi.tencentcloud.Eip;
    import com.pulumi.tencentcloud.NatGateway;
    import com.pulumi.tencentcloud.NatGatewayArgs;
    import com.pulumi.tencentcloud.NatRefreshNatDcRoute;
    import com.pulumi.tencentcloud.NatRefreshNatDcRouteArgs;
    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 vpc = new Vpc("vpc", VpcArgs.builder()
                .cidrBlock("10.0.0.0/16")
                .build());
    
            var eipExample = new Eip("eipExample");
    
            var nat = new NatGateway("nat", NatGatewayArgs.builder()
                .vpcId(vpc.vpcId())
                .maxConcurrent(3000000)
                .bandwidth(500)
                .assignedEipSets(eipExample.publicIp())
                .build());
    
            var refreshNatDcRoute = new NatRefreshNatDcRoute("refreshNatDcRoute", NatRefreshNatDcRouteArgs.builder()
                .natGatewayId(nat.natGatewayId())
                .vpcId(vpc.vpcId())
                .dryRun(true)
                .build());
    
        }
    }
    
    resources:
      vpc:
        type: tencentcloud:Vpc
        properties:
          cidrBlock: 10.0.0.0/16
      eipExample:
        type: tencentcloud:Eip
      nat:
        type: tencentcloud:NatGateway
        properties:
          vpcId: ${vpc.vpcId}
          maxConcurrent: 3e+06
          bandwidth: 500
          assignedEipSets:
            - ${eipExample.publicIp}
      refreshNatDcRoute:
        type: tencentcloud:NatRefreshNatDcRoute
        properties:
          natGatewayId: ${nat.natGatewayId}
          vpcId: ${vpc.vpcId}
          dryRun: true
    

    is False

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const refreshNatDcRoute = new tencentcloud.NatRefreshNatDcRoute("refreshNatDcRoute", {
        natGatewayId: tencentcloud_nat_gateway.nat.id,
        vpcId: tencentcloud_vpc.vpc.id,
        dryRun: false,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    refresh_nat_dc_route = tencentcloud.NatRefreshNatDcRoute("refreshNatDcRoute",
        nat_gateway_id=tencentcloud_nat_gateway["nat"]["id"],
        vpc_id=tencentcloud_vpc["vpc"]["id"],
        dry_run=False)
    
    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 {
    		_, err := tencentcloud.NewNatRefreshNatDcRoute(ctx, "refreshNatDcRoute", &tencentcloud.NatRefreshNatDcRouteArgs{
    			NatGatewayId: pulumi.Any(tencentcloud_nat_gateway.Nat.Id),
    			VpcId:        pulumi.Any(tencentcloud_vpc.Vpc.Id),
    			DryRun:       pulumi.Bool(false),
    		})
    		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 refreshNatDcRoute = new Tencentcloud.NatRefreshNatDcRoute("refreshNatDcRoute", new()
        {
            NatGatewayId = tencentcloud_nat_gateway.Nat.Id,
            VpcId = tencentcloud_vpc.Vpc.Id,
            DryRun = false,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.NatRefreshNatDcRoute;
    import com.pulumi.tencentcloud.NatRefreshNatDcRouteArgs;
    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 refreshNatDcRoute = new NatRefreshNatDcRoute("refreshNatDcRoute", NatRefreshNatDcRouteArgs.builder()
                .natGatewayId(tencentcloud_nat_gateway.nat().id())
                .vpcId(tencentcloud_vpc.vpc().id())
                .dryRun(false)
                .build());
    
        }
    }
    
    resources:
      refreshNatDcRoute:
        type: tencentcloud:NatRefreshNatDcRoute
        properties:
          natGatewayId: ${tencentcloud_nat_gateway.nat.id}
          vpcId: ${tencentcloud_vpc.vpc.id}
          dryRun: false
    

    Create NatRefreshNatDcRoute Resource

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

    Constructor syntax

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

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

    DryRun bool
    Whether to pre-refresh, valid values: True:yes, False:no.
    NatGatewayId string
    Unique identifier of Nat Gateway.
    VpcId string
    Unique identifier of Vpc.
    NatRefreshNatDcRouteId string
    ID of the resource.
    DryRun bool
    Whether to pre-refresh, valid values: True:yes, False:no.
    NatGatewayId string
    Unique identifier of Nat Gateway.
    VpcId string
    Unique identifier of Vpc.
    NatRefreshNatDcRouteId string
    ID of the resource.
    dryRun Boolean
    Whether to pre-refresh, valid values: True:yes, False:no.
    natGatewayId String
    Unique identifier of Nat Gateway.
    vpcId String
    Unique identifier of Vpc.
    natRefreshNatDcRouteId String
    ID of the resource.
    dryRun boolean
    Whether to pre-refresh, valid values: True:yes, False:no.
    natGatewayId string
    Unique identifier of Nat Gateway.
    vpcId string
    Unique identifier of Vpc.
    natRefreshNatDcRouteId string
    ID of the resource.
    dry_run bool
    Whether to pre-refresh, valid values: True:yes, False:no.
    nat_gateway_id str
    Unique identifier of Nat Gateway.
    vpc_id str
    Unique identifier of Vpc.
    nat_refresh_nat_dc_route_id str
    ID of the resource.
    dryRun Boolean
    Whether to pre-refresh, valid values: True:yes, False:no.
    natGatewayId String
    Unique identifier of Nat Gateway.
    vpcId String
    Unique identifier of Vpc.
    natRefreshNatDcRouteId String
    ID of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NatRefreshNatDcRoute 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 NatRefreshNatDcRoute Resource

    Get an existing NatRefreshNatDcRoute 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?: NatRefreshNatDcRouteState, opts?: CustomResourceOptions): NatRefreshNatDcRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            dry_run: Optional[bool] = None,
            nat_gateway_id: Optional[str] = None,
            nat_refresh_nat_dc_route_id: Optional[str] = None,
            vpc_id: Optional[str] = None) -> NatRefreshNatDcRoute
    func GetNatRefreshNatDcRoute(ctx *Context, name string, id IDInput, state *NatRefreshNatDcRouteState, opts ...ResourceOption) (*NatRefreshNatDcRoute, error)
    public static NatRefreshNatDcRoute Get(string name, Input<string> id, NatRefreshNatDcRouteState? state, CustomResourceOptions? opts = null)
    public static NatRefreshNatDcRoute get(String name, Output<String> id, NatRefreshNatDcRouteState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:NatRefreshNatDcRoute    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:
    DryRun bool
    Whether to pre-refresh, valid values: True:yes, False:no.
    NatGatewayId string
    Unique identifier of Nat Gateway.
    NatRefreshNatDcRouteId string
    ID of the resource.
    VpcId string
    Unique identifier of Vpc.
    DryRun bool
    Whether to pre-refresh, valid values: True:yes, False:no.
    NatGatewayId string
    Unique identifier of Nat Gateway.
    NatRefreshNatDcRouteId string
    ID of the resource.
    VpcId string
    Unique identifier of Vpc.
    dryRun Boolean
    Whether to pre-refresh, valid values: True:yes, False:no.
    natGatewayId String
    Unique identifier of Nat Gateway.
    natRefreshNatDcRouteId String
    ID of the resource.
    vpcId String
    Unique identifier of Vpc.
    dryRun boolean
    Whether to pre-refresh, valid values: True:yes, False:no.
    natGatewayId string
    Unique identifier of Nat Gateway.
    natRefreshNatDcRouteId string
    ID of the resource.
    vpcId string
    Unique identifier of Vpc.
    dry_run bool
    Whether to pre-refresh, valid values: True:yes, False:no.
    nat_gateway_id str
    Unique identifier of Nat Gateway.
    nat_refresh_nat_dc_route_id str
    ID of the resource.
    vpc_id str
    Unique identifier of Vpc.
    dryRun Boolean
    Whether to pre-refresh, valid values: True:yes, False:no.
    natGatewayId String
    Unique identifier of Nat Gateway.
    natRefreshNatDcRouteId String
    ID of the resource.
    vpcId String
    Unique identifier of Vpc.

    Import

    vpc refresh_nat_dc_route can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/natRefreshNatDcRoute:NatRefreshNatDcRoute refresh_nat_dc_route vpc_id#nat_gateway_id
    

    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