opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud
opentelekomcloud.getNatSnatRulesV2
Explore with Pulumi AI
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 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 dictionary
The 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.
- Floating
Ip stringAddress - Specifies the IP of the EIP associated with SNAT rule.
- Floating
Ip stringId - Specifies the ID of the EIP associated with SNAT rule.
- Gateway
Id string - Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- Id string
- The ID of the SNAT rule.
- Project
Id string - Specifies the project ID to which the SNAT rule belongs.
- Rule
Id string - Specifies the ID of the SNAT rule.
- Source
Type 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.
- Subnet
Id 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.
- Floating
Ip stringAddress - Specifies the IP of the EIP associated with SNAT rule.
- Floating
Ip stringId - Specifies the ID of the EIP associated with SNAT rule.
- Gateway
Id string - Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- Id string
- The ID of the SNAT rule.
- Project
Id string - Specifies the project ID to which the SNAT rule belongs.
- Rule
Id string - Specifies the ID of the SNAT rule.
- Source
Type 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.
- Subnet
Id 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.
- floating
Ip StringAddress - Specifies the IP of the EIP associated with SNAT rule.
- floating
Ip StringId - Specifies the ID of the EIP associated with SNAT rule.
- gateway
Id String - Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- id String
- The ID of the SNAT rule.
- project
Id String - Specifies the project ID to which the SNAT rule belongs.
- rule
Id String - Specifies the ID of the SNAT rule.
- source
Type 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.
- subnet
Id 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.
- floating
Ip stringAddress - Specifies the IP of the EIP associated with SNAT rule.
- floating
Ip stringId - Specifies the ID of the EIP associated with SNAT rule.
- gateway
Id string - Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- id string
- The ID of the SNAT rule.
- project
Id string - Specifies the project ID to which the SNAT rule belongs.
- rule
Id string - Specifies the ID of the SNAT rule.
- source
Type 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.
- subnet
Id 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.
- floating
Ip StringAddress - Specifies the IP of the EIP associated with SNAT rule.
- floating
Ip StringId - Specifies the ID of the EIP associated with SNAT rule.
- gateway
Id String - Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- id String
- The ID of the SNAT rule.
- project
Id String - Specifies the project ID to which the SNAT rule belongs.
- rule
Id String - Specifies the ID of the SNAT rule.
- source
Type 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.
- subnet
Id 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<Get
Nat 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
- Floating
Ip stringAddress - The IPs of the EIP associated with SNAT rule, multiple EIP IPs separate by commas.
e.g.
IP1,IP2
. - Floating
Ip stringId - The IDs of the EIP associated with SNAT rule, multiple EIP IDs separate by commas.
e.g.
ID1,ID2
. - Gateway
Id string - The ID of the NAT gateway to which the SNAT rule belongs.
- Project
Id string - The ID of the project ID to which the SNAT rule belongs.
- Rule
Id string - Source
Type double - The source type of the SNAT rule.
- Status string
- The status of the SNAT rule.
- Subnet
Id 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
[]Get
Nat 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
- Floating
Ip stringAddress - The IPs of the EIP associated with SNAT rule, multiple EIP IPs separate by commas.
e.g.
IP1,IP2
. - Floating
Ip stringId - The IDs of the EIP associated with SNAT rule, multiple EIP IDs separate by commas.
e.g.
ID1,ID2
. - Gateway
Id string - The ID of the NAT gateway to which the SNAT rule belongs.
- Project
Id string - The ID of the project ID to which the SNAT rule belongs.
- Rule
Id string - Source
Type float64 - The source type of the SNAT rule.
- Status string
- The status of the SNAT rule.
- Subnet
Id 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<Get
Nat 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
- floating
Ip StringAddress - The IPs of the EIP associated with SNAT rule, multiple EIP IPs separate by commas.
e.g.
IP1,IP2
. - floating
Ip StringId - The IDs of the EIP associated with SNAT rule, multiple EIP IDs separate by commas.
e.g.
ID1,ID2
. - gateway
Id String - The ID of the NAT gateway to which the SNAT rule belongs.
- project
Id String - The ID of the project ID to which the SNAT rule belongs.
- rule
Id String - source
Type Double - The source type of the SNAT rule.
- status String
- The status of the SNAT rule.
- subnet
Id 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
Get
Nat 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
- floating
Ip stringAddress - The IPs of the EIP associated with SNAT rule, multiple EIP IPs separate by commas.
e.g.
IP1,IP2
. - floating
Ip stringId - The IDs of the EIP associated with SNAT rule, multiple EIP IDs separate by commas.
e.g.
ID1,ID2
. - gateway
Id string - The ID of the NAT gateway to which the SNAT rule belongs.
- project
Id string - The ID of the project ID to which the SNAT rule belongs.
- rule
Id string - source
Type number - The source type of the SNAT rule.
- status string
- The status of the SNAT rule.
- subnet
Id 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[Get
Nat 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
- floating
Ip StringAddress - The IPs of the EIP associated with SNAT rule, multiple EIP IPs separate by commas.
e.g.
IP1,IP2
. - floating
Ip StringId - The IDs of the EIP associated with SNAT rule, multiple EIP IDs separate by commas.
e.g.
ID1,ID2
. - gateway
Id String - The ID of the NAT gateway to which the SNAT rule belongs.
- project
Id String - The ID of the project ID to which the SNAT rule belongs.
- rule
Id String - source
Type Number - The source type of the SNAT rule.
- status String
- The status of the SNAT rule.
- subnet
Id String - The ID of the subnet to which the SNAT rule belongs.
Supporting Types
GetNatSnatRulesV2Rule
- Admin
State boolUp - Specifies whether the SNAT rule is enabled or disabled.
- Cidr string
- Specifies the CIDR block to which the SNAT rule belongs.
- Created
At string - The creation time of the SNAT rule.
- Floating
Ip stringAddress - Specifies the IP of the EIP associated with SNAT rule.
- Floating
Ip stringId - Specifies the ID of the EIP associated with SNAT rule.
- Gateway
Id string - Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- Id string
- The ID of the SNAT rule.
- Project
Id string - Specifies the project ID to which the SNAT rule belongs.
- Source
Type 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.
- Subnet
Id 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 string
- Specifies the CIDR block to which the SNAT rule belongs.
- Created
At string - The creation time of the SNAT rule.
- Floating
Ip stringAddress - Specifies the IP of the EIP associated with SNAT rule.
- Floating
Ip stringId - Specifies the ID of the EIP associated with SNAT rule.
- Gateway
Id string - Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- Id string
- The ID of the SNAT rule.
- Project
Id string - Specifies the project ID to which the SNAT rule belongs.
- Source
Type 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.
- Subnet
Id string - Specifies the ID of the subnet to which the SNAT rule belongs.
- admin
State BooleanUp - Specifies whether the SNAT rule is enabled or disabled.
- cidr String
- Specifies the CIDR block to which the SNAT rule belongs.
- created
At String - The creation time of the SNAT rule.
- floating
Ip StringAddress - Specifies the IP of the EIP associated with SNAT rule.
- floating
Ip StringId - Specifies the ID of the EIP associated with SNAT rule.
- gateway
Id String - Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- id String
- The ID of the SNAT rule.
- project
Id String - Specifies the project ID to which the SNAT rule belongs.
- source
Type 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.
- subnet
Id String - Specifies the ID of the subnet to which the SNAT rule belongs.
- admin
State booleanUp - Specifies whether the SNAT rule is enabled or disabled.
- cidr string
- Specifies the CIDR block to which the SNAT rule belongs.
- created
At string - The creation time of the SNAT rule.
- floating
Ip stringAddress - Specifies the IP of the EIP associated with SNAT rule.
- floating
Ip stringId - Specifies the ID of the EIP associated with SNAT rule.
- gateway
Id string - Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- id string
- The ID of the SNAT rule.
- project
Id string - Specifies the project ID to which the SNAT rule belongs.
- source
Type 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.
- subnet
Id 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.
- admin
State BooleanUp - Specifies whether the SNAT rule is enabled or disabled.
- cidr String
- Specifies the CIDR block to which the SNAT rule belongs.
- created
At String - The creation time of the SNAT rule.
- floating
Ip StringAddress - Specifies the IP of the EIP associated with SNAT rule.
- floating
Ip StringId - Specifies the ID of the EIP associated with SNAT rule.
- gateway
Id String - Specifies the ID of the NAT gateway to which the SNAT rule belongs.
- id String
- The ID of the SNAT rule.
- project
Id String - Specifies the project ID to which the SNAT rule belongs.
- source
Type 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.
- subnet
Id 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
opentelekomcloud
Terraform Provider.
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud