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

tencentcloud.getCfwNatFwSwitches

Explore with Pulumi AI

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

    Use this data source to query detailed information of cfw nat_fw_switches

    Example Usage

    Query Nat instance’switch by instance id

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getCfwNatFwSwitches({
        natInsId: "cfwnat-18d2ba18",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_cfw_nat_fw_switches(nat_ins_id="cfwnat-18d2ba18")
    
    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.GetCfwNatFwSwitches(ctx, &tencentcloud.GetCfwNatFwSwitchesArgs{
    			NatInsId: pulumi.StringRef("cfwnat-18d2ba18"),
    		}, nil)
    		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 example = Tencentcloud.GetCfwNatFwSwitches.Invoke(new()
        {
            NatInsId = "cfwnat-18d2ba18",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetCfwNatFwSwitchesArgs;
    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 example = TencentcloudFunctions.getCfwNatFwSwitches(GetCfwNatFwSwitchesArgs.builder()
                .natInsId("cfwnat-18d2ba18")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getCfwNatFwSwitches
          arguments:
            natInsId: cfwnat-18d2ba18
    

    Or filter by switch status

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getCfwNatFwSwitches({
        natInsId: "cfwnat-18d2ba18",
        status: 1,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_cfw_nat_fw_switches(nat_ins_id="cfwnat-18d2ba18",
        status=1)
    
    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.GetCfwNatFwSwitches(ctx, &tencentcloud.GetCfwNatFwSwitchesArgs{
    			NatInsId: pulumi.StringRef("cfwnat-18d2ba18"),
    			Status:   pulumi.Float64Ref(1),
    		}, nil)
    		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 example = Tencentcloud.GetCfwNatFwSwitches.Invoke(new()
        {
            NatInsId = "cfwnat-18d2ba18",
            Status = 1,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetCfwNatFwSwitchesArgs;
    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 example = TencentcloudFunctions.getCfwNatFwSwitches(GetCfwNatFwSwitchesArgs.builder()
                .natInsId("cfwnat-18d2ba18")
                .status(1)
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getCfwNatFwSwitches
          arguments:
            natInsId: cfwnat-18d2ba18
            status: 1
    

    Using getCfwNatFwSwitches

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getCfwNatFwSwitches(args: GetCfwNatFwSwitchesArgs, opts?: InvokeOptions): Promise<GetCfwNatFwSwitchesResult>
    function getCfwNatFwSwitchesOutput(args: GetCfwNatFwSwitchesOutputArgs, opts?: InvokeOptions): Output<GetCfwNatFwSwitchesResult>
    def get_cfw_nat_fw_switches(id: Optional[str] = None,
                                nat_ins_id: Optional[str] = None,
                                result_output_file: Optional[str] = None,
                                status: Optional[float] = None,
                                opts: Optional[InvokeOptions] = None) -> GetCfwNatFwSwitchesResult
    def get_cfw_nat_fw_switches_output(id: Optional[pulumi.Input[str]] = None,
                                nat_ins_id: Optional[pulumi.Input[str]] = None,
                                result_output_file: Optional[pulumi.Input[str]] = None,
                                status: Optional[pulumi.Input[float]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetCfwNatFwSwitchesResult]
    func GetCfwNatFwSwitches(ctx *Context, args *GetCfwNatFwSwitchesArgs, opts ...InvokeOption) (*GetCfwNatFwSwitchesResult, error)
    func GetCfwNatFwSwitchesOutput(ctx *Context, args *GetCfwNatFwSwitchesOutputArgs, opts ...InvokeOption) GetCfwNatFwSwitchesResultOutput

    > Note: This function is named GetCfwNatFwSwitches in the Go SDK.

    public static class GetCfwNatFwSwitches 
    {
        public static Task<GetCfwNatFwSwitchesResult> InvokeAsync(GetCfwNatFwSwitchesArgs args, InvokeOptions? opts = null)
        public static Output<GetCfwNatFwSwitchesResult> Invoke(GetCfwNatFwSwitchesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCfwNatFwSwitchesResult> getCfwNatFwSwitches(GetCfwNatFwSwitchesArgs args, InvokeOptions options)
    public static Output<GetCfwNatFwSwitchesResult> getCfwNatFwSwitches(GetCfwNatFwSwitchesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getCfwNatFwSwitches:getCfwNatFwSwitches
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    ID.
    NatInsId string
    Filter the NAT firewall instance to which the NAT firewall subnet switch belongs.
    ResultOutputFile string
    Used to save results.
    Status double
    Switch status, 1 open; 0 close.
    Id string
    ID.
    NatInsId string
    Filter the NAT firewall instance to which the NAT firewall subnet switch belongs.
    ResultOutputFile string
    Used to save results.
    Status float64
    Switch status, 1 open; 0 close.
    id String
    ID.
    natInsId String
    Filter the NAT firewall instance to which the NAT firewall subnet switch belongs.
    resultOutputFile String
    Used to save results.
    status Double
    Switch status, 1 open; 0 close.
    id string
    ID.
    natInsId string
    Filter the NAT firewall instance to which the NAT firewall subnet switch belongs.
    resultOutputFile string
    Used to save results.
    status number
    Switch status, 1 open; 0 close.
    id str
    ID.
    nat_ins_id str
    Filter the NAT firewall instance to which the NAT firewall subnet switch belongs.
    result_output_file str
    Used to save results.
    status float
    Switch status, 1 open; 0 close.
    id String
    ID.
    natInsId String
    Filter the NAT firewall instance to which the NAT firewall subnet switch belongs.
    resultOutputFile String
    Used to save results.
    status Number
    Switch status, 1 open; 0 close.

    getCfwNatFwSwitches Result

    The following output properties are available:

    Datas List<GetCfwNatFwSwitchesData>
    NAT border firewall switch list data.
    Id string
    ID.
    NatInsId string
    NAT firewall instance Id.
    ResultOutputFile string
    Status double
    Switch status.
    Datas []GetCfwNatFwSwitchesData
    NAT border firewall switch list data.
    Id string
    ID.
    NatInsId string
    NAT firewall instance Id.
    ResultOutputFile string
    Status float64
    Switch status.
    datas List<GetCfwNatFwSwitchesData>
    NAT border firewall switch list data.
    id String
    ID.
    natInsId String
    NAT firewall instance Id.
    resultOutputFile String
    status Double
    Switch status.
    datas GetCfwNatFwSwitchesData[]
    NAT border firewall switch list data.
    id string
    ID.
    natInsId string
    NAT firewall instance Id.
    resultOutputFile string
    status number
    Switch status.
    datas Sequence[GetCfwNatFwSwitchesData]
    NAT border firewall switch list data.
    id str
    ID.
    nat_ins_id str
    NAT firewall instance Id.
    result_output_file str
    status float
    Switch status.
    datas List<Property Map>
    NAT border firewall switch list data.
    id String
    ID.
    natInsId String
    NAT firewall instance Id.
    resultOutputFile String
    status Number
    Switch status.

    Supporting Types

    GetCfwNatFwSwitchesData

    Abnormal double
    Whether the switch is abnormal, 0: normal, 1: abnormal.
    CvmNum double
    Cvm Num.
    Enable double
    Effective status.
    Id double
    ID.
    NatId string
    NAT gatway Id.
    NatInsId string
    Filter the NAT firewall instance to which the NAT firewall subnet switch belongs.
    NatInsName string
    NAT firewall instance name.
    NatName string
    NAT gatway name.
    Region string
    Region.
    RouteId string
    Route Id.
    RouteName string
    Route Name.
    Status double
    Switch status, 1 open; 0 close.
    SubnetCidr string
    IPv4 CIDR.
    SubnetId string
    Subnet Id.
    SubnetName string
    Subnet Name.
    VpcId string
    Vpc Id.
    VpcName string
    Vpc Name.
    Abnormal float64
    Whether the switch is abnormal, 0: normal, 1: abnormal.
    CvmNum float64
    Cvm Num.
    Enable float64
    Effective status.
    Id float64
    ID.
    NatId string
    NAT gatway Id.
    NatInsId string
    Filter the NAT firewall instance to which the NAT firewall subnet switch belongs.
    NatInsName string
    NAT firewall instance name.
    NatName string
    NAT gatway name.
    Region string
    Region.
    RouteId string
    Route Id.
    RouteName string
    Route Name.
    Status float64
    Switch status, 1 open; 0 close.
    SubnetCidr string
    IPv4 CIDR.
    SubnetId string
    Subnet Id.
    SubnetName string
    Subnet Name.
    VpcId string
    Vpc Id.
    VpcName string
    Vpc Name.
    abnormal Double
    Whether the switch is abnormal, 0: normal, 1: abnormal.
    cvmNum Double
    Cvm Num.
    enable Double
    Effective status.
    id Double
    ID.
    natId String
    NAT gatway Id.
    natInsId String
    Filter the NAT firewall instance to which the NAT firewall subnet switch belongs.
    natInsName String
    NAT firewall instance name.
    natName String
    NAT gatway name.
    region String
    Region.
    routeId String
    Route Id.
    routeName String
    Route Name.
    status Double
    Switch status, 1 open; 0 close.
    subnetCidr String
    IPv4 CIDR.
    subnetId String
    Subnet Id.
    subnetName String
    Subnet Name.
    vpcId String
    Vpc Id.
    vpcName String
    Vpc Name.
    abnormal number
    Whether the switch is abnormal, 0: normal, 1: abnormal.
    cvmNum number
    Cvm Num.
    enable number
    Effective status.
    id number
    ID.
    natId string
    NAT gatway Id.
    natInsId string
    Filter the NAT firewall instance to which the NAT firewall subnet switch belongs.
    natInsName string
    NAT firewall instance name.
    natName string
    NAT gatway name.
    region string
    Region.
    routeId string
    Route Id.
    routeName string
    Route Name.
    status number
    Switch status, 1 open; 0 close.
    subnetCidr string
    IPv4 CIDR.
    subnetId string
    Subnet Id.
    subnetName string
    Subnet Name.
    vpcId string
    Vpc Id.
    vpcName string
    Vpc Name.
    abnormal float
    Whether the switch is abnormal, 0: normal, 1: abnormal.
    cvm_num float
    Cvm Num.
    enable float
    Effective status.
    id float
    ID.
    nat_id str
    NAT gatway Id.
    nat_ins_id str
    Filter the NAT firewall instance to which the NAT firewall subnet switch belongs.
    nat_ins_name str
    NAT firewall instance name.
    nat_name str
    NAT gatway name.
    region str
    Region.
    route_id str
    Route Id.
    route_name str
    Route Name.
    status float
    Switch status, 1 open; 0 close.
    subnet_cidr str
    IPv4 CIDR.
    subnet_id str
    Subnet Id.
    subnet_name str
    Subnet Name.
    vpc_id str
    Vpc Id.
    vpc_name str
    Vpc Name.
    abnormal Number
    Whether the switch is abnormal, 0: normal, 1: abnormal.
    cvmNum Number
    Cvm Num.
    enable Number
    Effective status.
    id Number
    ID.
    natId String
    NAT gatway Id.
    natInsId String
    Filter the NAT firewall instance to which the NAT firewall subnet switch belongs.
    natInsName String
    NAT firewall instance name.
    natName String
    NAT gatway name.
    region String
    Region.
    routeId String
    Route Id.
    routeName String
    Route Name.
    status Number
    Switch status, 1 open; 0 close.
    subnetCidr String
    IPv4 CIDR.
    subnetId String
    Subnet Id.
    subnetName String
    Subnet Name.
    vpcId String
    Vpc Id.
    vpcName String
    Vpc Name.

    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