opentelekomcloud 1.36.51 published on Thursday, Oct 23, 2025 by opentelekomcloud
opentelekomcloud.getNatSnatRulesV2
opentelekomcloud 1.36.51 published on Thursday, Oct 23, 2025 by opentelekomcloud
Up-to-date reference of API arguments for NAT Gateway you can get at documentation portal
Use this data source to get the list of SNAT rules.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const ruleId = config.requireObject("ruleId");
const rule = opentelekomcloud.getNatSnatRulesV2({
    ruleId: ruleId,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
rule_id = config.require_object("ruleId")
rule = opentelekomcloud.get_nat_snat_rules_v2(rule_id=rule_id)
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
	"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, "")
		ruleId := cfg.RequireObject("ruleId")
		_, err := opentelekomcloud.GetNatSnatRulesV2(ctx, &opentelekomcloud.GetNatSnatRulesV2Args{
			RuleId: pulumi.StringRef(ruleId),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var ruleId = config.RequireObject<dynamic>("ruleId");
    var rule = Opentelekomcloud.GetNatSnatRulesV2.Invoke(new()
    {
        RuleId = ruleId,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
import com.pulumi.opentelekomcloud.inputs.GetNatSnatRulesV2Args;
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 ruleId = config.get("ruleId");
        final var rule = OpentelekomcloudFunctions.getNatSnatRulesV2(GetNatSnatRulesV2Args.builder()
            .ruleId(ruleId)
            .build());
    }
}
configuration:
  ruleId:
    type: dynamic
variables:
  rule:
    fn::invoke:
      function: opentelekomcloud:getNatSnatRulesV2
      arguments:
        ruleId: ${ruleId}
Using getNatSnatRulesV2
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 getNatSnatRulesV2(args: GetNatSnatRulesV2Args, opts?: InvokeOptions): Promise<GetNatSnatRulesV2Result>
function getNatSnatRulesV2Output(args: GetNatSnatRulesV2OutputArgs, opts?: InvokeOptions): Output<GetNatSnatRulesV2Result>def get_nat_snat_rules_v2(cidr: Optional[str] = None,
                          description: Optional[str] = None,
                          floating_ip_address: Optional[str] = None,
                          floating_ip_id: Optional[str] = None,
                          gateway_id: Optional[str] = None,
                          id: Optional[str] = None,
                          project_id: Optional[str] = None,
                          rule_id: Optional[str] = None,
                          source_type: Optional[float] = None,
                          status: Optional[str] = None,
                          subnet_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetNatSnatRulesV2Result
def get_nat_snat_rules_v2_output(cidr: Optional[pulumi.Input[str]] = None,
                          description: Optional[pulumi.Input[str]] = None,
                          floating_ip_address: Optional[pulumi.Input[str]] = None,
                          floating_ip_id: Optional[pulumi.Input[str]] = None,
                          gateway_id: Optional[pulumi.Input[str]] = None,
                          id: Optional[pulumi.Input[str]] = None,
                          project_id: Optional[pulumi.Input[str]] = None,
                          rule_id: Optional[pulumi.Input[str]] = None,
                          source_type: Optional[pulumi.Input[float]] = None,
                          status: Optional[pulumi.Input[str]] = None,
                          subnet_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetNatSnatRulesV2Result]func GetNatSnatRulesV2(ctx *Context, args *GetNatSnatRulesV2Args, opts ...InvokeOption) (*GetNatSnatRulesV2Result, error)
func GetNatSnatRulesV2Output(ctx *Context, args *GetNatSnatRulesV2OutputArgs, opts ...InvokeOption) GetNatSnatRulesV2ResultOutput> Note: This function is named GetNatSnatRulesV2 in the Go SDK.
public static class GetNatSnatRulesV2 
{
    public static Task<GetNatSnatRulesV2Result> InvokeAsync(GetNatSnatRulesV2Args args, InvokeOptions? opts = null)
    public static Output<GetNatSnatRulesV2Result> Invoke(GetNatSnatRulesV2InvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNatSnatRulesV2Result> getNatSnatRulesV2(GetNatSnatRulesV2Args args, InvokeOptions options)
public static Output<GetNatSnatRulesV2Result> getNatSnatRulesV2(GetNatSnatRulesV2Args args, InvokeOptions options)
fn::invoke:
  function: opentelekomcloud:index/getNatSnatRulesV2:getNatSnatRulesV2
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Cidr string
- Specifies the CIDR block to which the SNAT rule belongs.
- Description string
- Specifies the description of the SNAT rule.
- FloatingIp stringAddress 
- Specifies the IP of the EIP associated with SNAT rule.
- FloatingIp stringId 
- Specifies the ID of the EIP associated with SNAT rule.
- GatewayId string
- Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- Id string
- The ID of the SNAT rule.
- ProjectId string
- Specifies the project ID to which the SNAT rule belongs.
- RuleId string
- Specifies the ID of the SNAT rule.
- SourceType double
- Specifies the source type of the SNAT rule. The value can be one of the following:
- Status string
- Specifies the status of the SNAT rule.
The value can be one of the following:- ACTIVE: The SNAT rule is available.
- EIP_FREEZED: The global EIP is frozen associated with SNAT rule.
 - INACTIVE: The SNAT rule is unavailable.
 
- SubnetId string
- Specifies the ID of the subnet to which the SNAT rule belongs.
- Cidr string
- Specifies the CIDR block to which the SNAT rule belongs.
- Description string
- Specifies the description of the SNAT rule.
- FloatingIp stringAddress 
- Specifies the IP of the EIP associated with SNAT rule.
- FloatingIp stringId 
- Specifies the ID of the EIP associated with SNAT rule.
- GatewayId string
- Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- Id string
- The ID of the SNAT rule.
- ProjectId string
- Specifies the project ID to which the SNAT rule belongs.
- RuleId string
- Specifies the ID of the SNAT rule.
- SourceType float64
- Specifies the source type of the SNAT rule. The value can be one of the following:
- Status string
- Specifies the status of the SNAT rule.
The value can be one of the following:- ACTIVE: The SNAT rule is available.
- EIP_FREEZED: The global EIP is frozen associated with SNAT rule.
 - INACTIVE: The SNAT rule is unavailable.
 
- SubnetId string
- Specifies the ID of the subnet to which the SNAT rule belongs.
- cidr String
- Specifies the CIDR block to which the SNAT rule belongs.
- description String
- Specifies the description of the SNAT rule.
- floatingIp StringAddress 
- Specifies the IP of the EIP associated with SNAT rule.
- floatingIp StringId 
- Specifies the ID of the EIP associated with SNAT rule.
- gatewayId String
- Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- id String
- The ID of the SNAT rule.
- projectId String
- Specifies the project ID to which the SNAT rule belongs.
- ruleId String
- Specifies the ID of the SNAT rule.
- sourceType Double
- Specifies the source type of the SNAT rule. The value can be one of the following:
- status String
- Specifies the status of the SNAT rule.
The value can be one of the following:- ACTIVE: The SNAT rule is available.
- EIP_FREEZED: The global EIP is frozen associated with SNAT rule.
 - INACTIVE: The SNAT rule is unavailable.
 
- subnetId String
- Specifies the ID of the subnet to which the SNAT rule belongs.
- cidr string
- Specifies the CIDR block to which the SNAT rule belongs.
- description string
- Specifies the description of the SNAT rule.
- floatingIp stringAddress 
- Specifies the IP of the EIP associated with SNAT rule.
- floatingIp stringId 
- Specifies the ID of the EIP associated with SNAT rule.
- gatewayId string
- Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- id string
- The ID of the SNAT rule.
- projectId string
- Specifies the project ID to which the SNAT rule belongs.
- ruleId string
- Specifies the ID of the SNAT rule.
- sourceType number
- Specifies the source type of the SNAT rule. The value can be one of the following:
- status string
- Specifies the status of the SNAT rule.
The value can be one of the following:- ACTIVE: The SNAT rule is available.
- EIP_FREEZED: The global EIP is frozen associated with SNAT rule.
 - INACTIVE: The SNAT rule is unavailable.
 
- subnetId string
- Specifies the ID of the subnet to which the SNAT rule belongs.
- cidr str
- Specifies the CIDR block to which the SNAT rule belongs.
- description str
- Specifies the description of the SNAT rule.
- floating_ip_ straddress 
- Specifies the IP of the EIP associated with SNAT rule.
- floating_ip_ strid 
- Specifies the ID of the EIP associated with SNAT rule.
- gateway_id str
- Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- id str
- The ID of the SNAT rule.
- project_id str
- Specifies the project ID to which the SNAT rule belongs.
- rule_id str
- Specifies the ID of the SNAT rule.
- source_type float
- Specifies the source type of the SNAT rule. The value can be one of the following:
- status str
- Specifies the status of the SNAT rule.
The value can be one of the following:- ACTIVE: The SNAT rule is available.
- EIP_FREEZED: The global EIP is frozen associated with SNAT rule.
 - INACTIVE: The SNAT rule is unavailable.
 
- subnet_id str
- Specifies the ID of the subnet to which the SNAT rule belongs.
- cidr String
- Specifies the CIDR block to which the SNAT rule belongs.
- description String
- Specifies the description of the SNAT rule.
- floatingIp StringAddress 
- Specifies the IP of the EIP associated with SNAT rule.
- floatingIp StringId 
- Specifies the ID of the EIP associated with SNAT rule.
- gatewayId String
- Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- id String
- The ID of the SNAT rule.
- projectId String
- Specifies the project ID to which the SNAT rule belongs.
- ruleId String
- Specifies the ID of the SNAT rule.
- sourceType Number
- Specifies the source type of the SNAT rule. The value can be one of the following:
- status String
- Specifies the status of the SNAT rule.
The value can be one of the following:- ACTIVE: The SNAT rule is available.
- EIP_FREEZED: The global EIP is frozen associated with SNAT rule.
 - INACTIVE: The SNAT rule is unavailable.
 
- subnetId String
- Specifies the ID of the subnet to which the SNAT rule belongs.
getNatSnatRulesV2 Result
The following output properties are available:
- Id string
- The ID of the SNAT rule.
- Region string
- The region where the SNAT rules are located.
- Rules
List<GetNat Snat Rules V2Rule> 
- The list of the SNAT rules. The rules structure is documented below.
- Cidr string
- The CIDR block to which the SNAT rule belongs.
- Description string
- FloatingIp stringAddress 
- The IPs of the EIP associated with SNAT rule, multiple EIP IPs separate by commas.
e.g. IP1,IP2.
- FloatingIp stringId 
- The IDs of the EIP associated with SNAT rule, multiple EIP IDs separate by commas.
e.g. ID1,ID2.
- GatewayId string
- The ID of the NAT gateway to which the SNAT rule belongs.
- ProjectId string
- The ID of the project ID to which the SNAT rule belongs.
- RuleId string
- SourceType double
- The source type of the SNAT rule.
- Status string
- The status of the SNAT rule.
- SubnetId string
- The ID of the subnet to which the SNAT rule belongs.
- Id string
- The ID of the SNAT rule.
- Region string
- The region where the SNAT rules are located.
- Rules
[]GetNat Snat Rules V2Rule 
- The list of the SNAT rules. The rules structure is documented below.
- Cidr string
- The CIDR block to which the SNAT rule belongs.
- Description string
- FloatingIp stringAddress 
- The IPs of the EIP associated with SNAT rule, multiple EIP IPs separate by commas.
e.g. IP1,IP2.
- FloatingIp stringId 
- The IDs of the EIP associated with SNAT rule, multiple EIP IDs separate by commas.
e.g. ID1,ID2.
- GatewayId string
- The ID of the NAT gateway to which the SNAT rule belongs.
- ProjectId string
- The ID of the project ID to which the SNAT rule belongs.
- RuleId string
- SourceType float64
- The source type of the SNAT rule.
- Status string
- The status of the SNAT rule.
- SubnetId string
- The ID of the subnet to which the SNAT rule belongs.
- id String
- The ID of the SNAT rule.
- region String
- The region where the SNAT rules are located.
- rules
List<GetNat Snat Rules V2Rule> 
- The list of the SNAT rules. The rules structure is documented below.
- cidr String
- The CIDR block to which the SNAT rule belongs.
- description String
- floatingIp StringAddress 
- The IPs of the EIP associated with SNAT rule, multiple EIP IPs separate by commas.
e.g. IP1,IP2.
- floatingIp StringId 
- The IDs of the EIP associated with SNAT rule, multiple EIP IDs separate by commas.
e.g. ID1,ID2.
- gatewayId String
- The ID of the NAT gateway to which the SNAT rule belongs.
- projectId String
- The ID of the project ID to which the SNAT rule belongs.
- ruleId String
- sourceType Double
- The source type of the SNAT rule.
- status String
- The status of the SNAT rule.
- subnetId String
- The ID of the subnet to which the SNAT rule belongs.
- id string
- The ID of the SNAT rule.
- region string
- The region where the SNAT rules are located.
- rules
GetNat Snat Rules V2Rule[] 
- The list of the SNAT rules. The rules structure is documented below.
- cidr string
- The CIDR block to which the SNAT rule belongs.
- description string
- floatingIp stringAddress 
- The IPs of the EIP associated with SNAT rule, multiple EIP IPs separate by commas.
e.g. IP1,IP2.
- floatingIp stringId 
- The IDs of the EIP associated with SNAT rule, multiple EIP IDs separate by commas.
e.g. ID1,ID2.
- gatewayId string
- The ID of the NAT gateway to which the SNAT rule belongs.
- projectId string
- The ID of the project ID to which the SNAT rule belongs.
- ruleId string
- sourceType number
- The source type of the SNAT rule.
- status string
- The status of the SNAT rule.
- subnetId string
- The ID of the subnet to which the SNAT rule belongs.
- id str
- The ID of the SNAT rule.
- region str
- The region where the SNAT rules are located.
- rules
Sequence[GetNat Snat Rules V2Rule] 
- The list of the SNAT rules. The rules structure is documented below.
- cidr str
- The CIDR block to which the SNAT rule belongs.
- description str
- floating_ip_ straddress 
- The IPs of the EIP associated with SNAT rule, multiple EIP IPs separate by commas.
e.g. IP1,IP2.
- floating_ip_ strid 
- The IDs of the EIP associated with SNAT rule, multiple EIP IDs separate by commas.
e.g. ID1,ID2.
- gateway_id str
- The ID of the NAT gateway to which the SNAT rule belongs.
- project_id str
- The ID of the project ID to which the SNAT rule belongs.
- rule_id str
- source_type float
- The source type of the SNAT rule.
- status str
- The status of the SNAT rule.
- subnet_id str
- The ID of the subnet to which the SNAT rule belongs.
- id String
- The ID of the SNAT rule.
- region String
- The region where the SNAT rules are located.
- rules List<Property Map>
- The list of the SNAT rules. The rules structure is documented below.
- cidr String
- The CIDR block to which the SNAT rule belongs.
- description String
- floatingIp StringAddress 
- The IPs of the EIP associated with SNAT rule, multiple EIP IPs separate by commas.
e.g. IP1,IP2.
- floatingIp StringId 
- The IDs of the EIP associated with SNAT rule, multiple EIP IDs separate by commas.
e.g. ID1,ID2.
- gatewayId String
- The ID of the NAT gateway to which the SNAT rule belongs.
- projectId String
- The ID of the project ID to which the SNAT rule belongs.
- ruleId String
- sourceType Number
- The source type of the SNAT rule.
- status String
- The status of the SNAT rule.
- subnetId String
- The ID of the subnet to which the SNAT rule belongs.
Supporting Types
GetNatSnatRulesV2Rule    
- AdminState boolUp 
- Specifies whether the SNAT rule is enabled or disabled.
- Cidr string
- Specifies the CIDR block to which the SNAT rule belongs.
- CreatedAt string
- The creation time of the SNAT rule.
- FloatingIp stringAddress 
- Specifies the IP of the EIP associated with SNAT rule.
- FloatingIp stringId 
- Specifies the ID of the EIP associated with SNAT rule.
- GatewayId string
- Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- Id string
- The ID of the SNAT rule.
- ProjectId string
- Specifies the project ID to which the SNAT rule belongs.
- SourceType double
- Specifies the source type of the SNAT rule. The value can be one of the following:
- Status string
- Specifies the status of the SNAT rule.
The value can be one of the following:- ACTIVE: The SNAT rule is available.
- EIP_FREEZED: The global EIP is frozen associated with SNAT rule.
 - INACTIVE: The SNAT rule is unavailable.
 
- SubnetId string
- Specifies the ID of the subnet to which the SNAT rule belongs.
- AdminState boolUp 
- Specifies whether the SNAT rule is enabled or disabled.
- Cidr string
- Specifies the CIDR block to which the SNAT rule belongs.
- CreatedAt string
- The creation time of the SNAT rule.
- FloatingIp stringAddress 
- Specifies the IP of the EIP associated with SNAT rule.
- FloatingIp stringId 
- Specifies the ID of the EIP associated with SNAT rule.
- GatewayId string
- Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- Id string
- The ID of the SNAT rule.
- ProjectId string
- Specifies the project ID to which the SNAT rule belongs.
- SourceType float64
- Specifies the source type of the SNAT rule. The value can be one of the following:
- Status string
- Specifies the status of the SNAT rule.
The value can be one of the following:- ACTIVE: The SNAT rule is available.
- EIP_FREEZED: The global EIP is frozen associated with SNAT rule.
 - INACTIVE: The SNAT rule is unavailable.
 
- SubnetId string
- Specifies the ID of the subnet to which the SNAT rule belongs.
- adminState BooleanUp 
- Specifies whether the SNAT rule is enabled or disabled.
- cidr String
- Specifies the CIDR block to which the SNAT rule belongs.
- createdAt String
- The creation time of the SNAT rule.
- floatingIp StringAddress 
- Specifies the IP of the EIP associated with SNAT rule.
- floatingIp StringId 
- Specifies the ID of the EIP associated with SNAT rule.
- gatewayId String
- Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- id String
- The ID of the SNAT rule.
- projectId String
- Specifies the project ID to which the SNAT rule belongs.
- sourceType Double
- Specifies the source type of the SNAT rule. The value can be one of the following:
- status String
- Specifies the status of the SNAT rule.
The value can be one of the following:- ACTIVE: The SNAT rule is available.
- EIP_FREEZED: The global EIP is frozen associated with SNAT rule.
 - INACTIVE: The SNAT rule is unavailable.
 
- subnetId String
- Specifies the ID of the subnet to which the SNAT rule belongs.
- adminState booleanUp 
- Specifies whether the SNAT rule is enabled or disabled.
- cidr string
- Specifies the CIDR block to which the SNAT rule belongs.
- createdAt string
- The creation time of the SNAT rule.
- floatingIp stringAddress 
- Specifies the IP of the EIP associated with SNAT rule.
- floatingIp stringId 
- Specifies the ID of the EIP associated with SNAT rule.
- gatewayId string
- Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- id string
- The ID of the SNAT rule.
- projectId string
- Specifies the project ID to which the SNAT rule belongs.
- sourceType number
- Specifies the source type of the SNAT rule. The value can be one of the following:
- status string
- Specifies the status of the SNAT rule.
The value can be one of the following:- ACTIVE: The SNAT rule is available.
- EIP_FREEZED: The global EIP is frozen associated with SNAT rule.
 - INACTIVE: The SNAT rule is unavailable.
 
- subnetId string
- Specifies the ID of the subnet to which the SNAT rule belongs.
- admin_state_ boolup 
- Specifies whether the SNAT rule is enabled or disabled.
- cidr str
- Specifies the CIDR block to which the SNAT rule belongs.
- created_at str
- The creation time of the SNAT rule.
- floating_ip_ straddress 
- Specifies the IP of the EIP associated with SNAT rule.
- floating_ip_ strid 
- Specifies the ID of the EIP associated with SNAT rule.
- gateway_id str
- Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- id str
- The ID of the SNAT rule.
- project_id str
- Specifies the project ID to which the SNAT rule belongs.
- source_type float
- Specifies the source type of the SNAT rule. The value can be one of the following:
- status str
- Specifies the status of the SNAT rule.
The value can be one of the following:- ACTIVE: The SNAT rule is available.
- EIP_FREEZED: The global EIP is frozen associated with SNAT rule.
 - INACTIVE: The SNAT rule is unavailable.
 
- subnet_id str
- Specifies the ID of the subnet to which the SNAT rule belongs.
- adminState BooleanUp 
- Specifies whether the SNAT rule is enabled or disabled.
- cidr String
- Specifies the CIDR block to which the SNAT rule belongs.
- createdAt String
- The creation time of the SNAT rule.
- floatingIp StringAddress 
- Specifies the IP of the EIP associated with SNAT rule.
- floatingIp StringId 
- Specifies the ID of the EIP associated with SNAT rule.
- gatewayId String
- Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- id String
- The ID of the SNAT rule.
- projectId String
- Specifies the project ID to which the SNAT rule belongs.
- sourceType Number
- Specifies the source type of the SNAT rule. The value can be one of the following:
- status String
- Specifies the status of the SNAT rule.
The value can be one of the following:- ACTIVE: The SNAT rule is available.
- EIP_FREEZED: The global EIP is frozen associated with SNAT rule.
 - INACTIVE: The SNAT rule is unavailable.
 
- subnetId String
- Specifies the ID of the subnet to which the SNAT rule belongs.
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the opentelekomcloudTerraform Provider.
opentelekomcloud 1.36.51 published on Thursday, Oct 23, 2025 by opentelekomcloud
