1. Packages
  2. Packages
  3. Tencentcloud Provider
  4. API Docs
  5. TseCloudNativeApiGatewayIpRestriction
Viewing docs for tencentcloud 1.83.23
published on Friday, Aug 14, 2026 by tencentcloudstack
Viewing docs for tencentcloud 1.83.23
published on Friday, Aug 14, 2026 by tencentcloudstack

    Provides a resource to manage a TSE cloud native API gateway IP restriction.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.TseCloudNativeApiGatewayIpRestriction("example", {
        gatewayId: "gateway-ddbb709b",
        sourceType: "route",
        sourceId: "route-xxxx",
        enabled: true,
        restrictionType: "whiteList",
        addressLists: [
            "10.0.0.0/8",
            "192.168.1.1",
        ],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.TseCloudNativeApiGatewayIpRestriction("example",
        gateway_id="gateway-ddbb709b",
        source_type="route",
        source_id="route-xxxx",
        enabled=True,
        restriction_type="whiteList",
        address_lists=[
            "10.0.0.0/8",
            "192.168.1.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.NewTseCloudNativeApiGatewayIpRestriction(ctx, "example", &tencentcloud.TseCloudNativeApiGatewayIpRestrictionArgs{
    			GatewayId:       pulumi.String("gateway-ddbb709b"),
    			SourceType:      pulumi.String("route"),
    			SourceId:        pulumi.String("route-xxxx"),
    			Enabled:         pulumi.Bool(true),
    			RestrictionType: pulumi.String("whiteList"),
    			AddressLists: pulumi.StringArray{
    				pulumi.String("10.0.0.0/8"),
    				pulumi.String("192.168.1.1"),
    			},
    		})
    		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 = new Tencentcloud.TseCloudNativeApiGatewayIpRestriction("example", new()
        {
            GatewayId = "gateway-ddbb709b",
            SourceType = "route",
            SourceId = "route-xxxx",
            Enabled = true,
            RestrictionType = "whiteList",
            AddressLists = new[]
            {
                "10.0.0.0/8",
                "192.168.1.1",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TseCloudNativeApiGatewayIpRestriction;
    import com.pulumi.tencentcloud.TseCloudNativeApiGatewayIpRestrictionArgs;
    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 example = new TseCloudNativeApiGatewayIpRestriction("example", TseCloudNativeApiGatewayIpRestrictionArgs.builder()
                .gatewayId("gateway-ddbb709b")
                .sourceType("route")
                .sourceId("route-xxxx")
                .enabled(true)
                .restrictionType("whiteList")
                .addressLists(            
                    "10.0.0.0/8",
                    "192.168.1.1")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:TseCloudNativeApiGatewayIpRestriction
        properties:
          gatewayId: gateway-ddbb709b
          sourceType: route
          sourceId: route-xxxx
          enabled: true
          restrictionType: whiteList
          addressLists:
            - 10.0.0.0/8
            - 192.168.1.1
    
    Example coming soon!
    

    Create TseCloudNativeApiGatewayIpRestriction Resource

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

    Constructor syntax

    new TseCloudNativeApiGatewayIpRestriction(name: string, args: TseCloudNativeApiGatewayIpRestrictionArgs, opts?: CustomResourceOptions);
    @overload
    def TseCloudNativeApiGatewayIpRestriction(resource_name: str,
                                              args: TseCloudNativeApiGatewayIpRestrictionArgs,
                                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def TseCloudNativeApiGatewayIpRestriction(resource_name: str,
                                              opts: Optional[ResourceOptions] = None,
                                              gateway_id: Optional[str] = None,
                                              source_id: Optional[str] = None,
                                              source_type: Optional[str] = None,
                                              address_lists: Optional[Sequence[str]] = None,
                                              enabled: Optional[bool] = None,
                                              restriction_type: Optional[str] = None,
                                              tse_cloud_native_api_gateway_ip_restriction_id: Optional[str] = None)
    func NewTseCloudNativeApiGatewayIpRestriction(ctx *Context, name string, args TseCloudNativeApiGatewayIpRestrictionArgs, opts ...ResourceOption) (*TseCloudNativeApiGatewayIpRestriction, error)
    public TseCloudNativeApiGatewayIpRestriction(string name, TseCloudNativeApiGatewayIpRestrictionArgs args, CustomResourceOptions? opts = null)
    public TseCloudNativeApiGatewayIpRestriction(String name, TseCloudNativeApiGatewayIpRestrictionArgs args)
    public TseCloudNativeApiGatewayIpRestriction(String name, TseCloudNativeApiGatewayIpRestrictionArgs args, CustomResourceOptions options)
    
    type: tencentcloud:TseCloudNativeApiGatewayIpRestriction
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "tencentcloud_tse_cloud_native_api_gateway_ip_restriction" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args TseCloudNativeApiGatewayIpRestrictionArgs
    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 TseCloudNativeApiGatewayIpRestrictionArgs
    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 TseCloudNativeApiGatewayIpRestrictionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TseCloudNativeApiGatewayIpRestrictionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TseCloudNativeApiGatewayIpRestrictionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    GatewayId string
    Gateway ID.
    SourceId string
    Route or service ID.
    SourceType string
    Resource type bound to the IP restriction plugin: route|service.
    AddressLists List<string>
    IP/CIDR address list.
    Enabled bool
    Whether to enable the plugin.
    RestrictionType string
    IP restriction type: whiteList|blackList.
    TseCloudNativeApiGatewayIpRestrictionId string
    ID of the resource.
    GatewayId string
    Gateway ID.
    SourceId string
    Route or service ID.
    SourceType string
    Resource type bound to the IP restriction plugin: route|service.
    AddressLists []string
    IP/CIDR address list.
    Enabled bool
    Whether to enable the plugin.
    RestrictionType string
    IP restriction type: whiteList|blackList.
    TseCloudNativeApiGatewayIpRestrictionId string
    ID of the resource.
    gateway_id string
    Gateway ID.
    source_id string
    Route or service ID.
    source_type string
    Resource type bound to the IP restriction plugin: route|service.
    address_lists list(string)
    IP/CIDR address list.
    enabled bool
    Whether to enable the plugin.
    restriction_type string
    IP restriction type: whiteList|blackList.
    tse_cloud_native_api_gateway_ip_restriction_id string
    ID of the resource.
    gatewayId String
    Gateway ID.
    sourceId String
    Route or service ID.
    sourceType String
    Resource type bound to the IP restriction plugin: route|service.
    addressLists List<String>
    IP/CIDR address list.
    enabled Boolean
    Whether to enable the plugin.
    restrictionType String
    IP restriction type: whiteList|blackList.
    tseCloudNativeApiGatewayIpRestrictionId String
    ID of the resource.
    gatewayId string
    Gateway ID.
    sourceId string
    Route or service ID.
    sourceType string
    Resource type bound to the IP restriction plugin: route|service.
    addressLists string[]
    IP/CIDR address list.
    enabled boolean
    Whether to enable the plugin.
    restrictionType string
    IP restriction type: whiteList|blackList.
    tseCloudNativeApiGatewayIpRestrictionId string
    ID of the resource.
    gateway_id str
    Gateway ID.
    source_id str
    Route or service ID.
    source_type str
    Resource type bound to the IP restriction plugin: route|service.
    address_lists Sequence[str]
    IP/CIDR address list.
    enabled bool
    Whether to enable the plugin.
    restriction_type str
    IP restriction type: whiteList|blackList.
    tse_cloud_native_api_gateway_ip_restriction_id str
    ID of the resource.
    gatewayId String
    Gateway ID.
    sourceId String
    Route or service ID.
    sourceType String
    Resource type bound to the IP restriction plugin: route|service.
    addressLists List<String>
    IP/CIDR address list.
    enabled Boolean
    Whether to enable the plugin.
    restrictionType String
    IP restriction type: whiteList|blackList.
    tseCloudNativeApiGatewayIpRestrictionId String
    ID of the resource.

    Outputs

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

    Get an existing TseCloudNativeApiGatewayIpRestriction 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?: TseCloudNativeApiGatewayIpRestrictionState, opts?: CustomResourceOptions): TseCloudNativeApiGatewayIpRestriction
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            address_lists: Optional[Sequence[str]] = None,
            enabled: Optional[bool] = None,
            gateway_id: Optional[str] = None,
            restriction_type: Optional[str] = None,
            source_id: Optional[str] = None,
            source_type: Optional[str] = None,
            tse_cloud_native_api_gateway_ip_restriction_id: Optional[str] = None) -> TseCloudNativeApiGatewayIpRestriction
    func GetTseCloudNativeApiGatewayIpRestriction(ctx *Context, name string, id IDInput, state *TseCloudNativeApiGatewayIpRestrictionState, opts ...ResourceOption) (*TseCloudNativeApiGatewayIpRestriction, error)
    public static TseCloudNativeApiGatewayIpRestriction Get(string name, Input<string> id, TseCloudNativeApiGatewayIpRestrictionState? state, CustomResourceOptions? opts = null)
    public static TseCloudNativeApiGatewayIpRestriction get(String name, Output<String> id, TseCloudNativeApiGatewayIpRestrictionState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:TseCloudNativeApiGatewayIpRestriction    get:      id: ${id}
    import {
      to = tencentcloud_tse_cloud_native_api_gateway_ip_restriction.example
      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:
    AddressLists List<string>
    IP/CIDR address list.
    Enabled bool
    Whether to enable the plugin.
    GatewayId string
    Gateway ID.
    RestrictionType string
    IP restriction type: whiteList|blackList.
    SourceId string
    Route or service ID.
    SourceType string
    Resource type bound to the IP restriction plugin: route|service.
    TseCloudNativeApiGatewayIpRestrictionId string
    ID of the resource.
    AddressLists []string
    IP/CIDR address list.
    Enabled bool
    Whether to enable the plugin.
    GatewayId string
    Gateway ID.
    RestrictionType string
    IP restriction type: whiteList|blackList.
    SourceId string
    Route or service ID.
    SourceType string
    Resource type bound to the IP restriction plugin: route|service.
    TseCloudNativeApiGatewayIpRestrictionId string
    ID of the resource.
    address_lists list(string)
    IP/CIDR address list.
    enabled bool
    Whether to enable the plugin.
    gateway_id string
    Gateway ID.
    restriction_type string
    IP restriction type: whiteList|blackList.
    source_id string
    Route or service ID.
    source_type string
    Resource type bound to the IP restriction plugin: route|service.
    tse_cloud_native_api_gateway_ip_restriction_id string
    ID of the resource.
    addressLists List<String>
    IP/CIDR address list.
    enabled Boolean
    Whether to enable the plugin.
    gatewayId String
    Gateway ID.
    restrictionType String
    IP restriction type: whiteList|blackList.
    sourceId String
    Route or service ID.
    sourceType String
    Resource type bound to the IP restriction plugin: route|service.
    tseCloudNativeApiGatewayIpRestrictionId String
    ID of the resource.
    addressLists string[]
    IP/CIDR address list.
    enabled boolean
    Whether to enable the plugin.
    gatewayId string
    Gateway ID.
    restrictionType string
    IP restriction type: whiteList|blackList.
    sourceId string
    Route or service ID.
    sourceType string
    Resource type bound to the IP restriction plugin: route|service.
    tseCloudNativeApiGatewayIpRestrictionId string
    ID of the resource.
    address_lists Sequence[str]
    IP/CIDR address list.
    enabled bool
    Whether to enable the plugin.
    gateway_id str
    Gateway ID.
    restriction_type str
    IP restriction type: whiteList|blackList.
    source_id str
    Route or service ID.
    source_type str
    Resource type bound to the IP restriction plugin: route|service.
    tse_cloud_native_api_gateway_ip_restriction_id str
    ID of the resource.
    addressLists List<String>
    IP/CIDR address list.
    enabled Boolean
    Whether to enable the plugin.
    gatewayId String
    Gateway ID.
    restrictionType String
    IP restriction type: whiteList|blackList.
    sourceId String
    Route or service ID.
    sourceType String
    Resource type bound to the IP restriction plugin: route|service.
    tseCloudNativeApiGatewayIpRestrictionId String
    ID of the resource.

    Import

    tse cloud native api gateway ip restriction can be imported using the composite id, e.g.

    $ pulumi import tencentcloud:index/tseCloudNativeApiGatewayIpRestriction:TseCloudNativeApiGatewayIpRestriction example gatewayId#sourceType#sourceId
    

    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.
    Viewing docs for tencentcloud 1.83.23
    published on Friday, Aug 14, 2026 by tencentcloudstack

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial