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

tencentcloud.TseCngwNetworkAccessControl

Explore with Pulumi AI

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

    Provides a resource to create a tse cngw_network_access_control

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const cngwNetworkAccessControl = new tencentcloud.TseCngwNetworkAccessControl("cngwNetworkAccessControl", {
        accessControl: {
            cidrWhiteLists: ["1.1.1.0"],
            mode: "Whitelist",
        },
        gatewayId: "gateway-cf8c99c3",
        groupId: "group-a160d123",
        networkId: "network-372b1e84",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    cngw_network_access_control = tencentcloud.TseCngwNetworkAccessControl("cngwNetworkAccessControl",
        access_control={
            "cidr_white_lists": ["1.1.1.0"],
            "mode": "Whitelist",
        },
        gateway_id="gateway-cf8c99c3",
        group_id="group-a160d123",
        network_id="network-372b1e84")
    
    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.NewTseCngwNetworkAccessControl(ctx, "cngwNetworkAccessControl", &tencentcloud.TseCngwNetworkAccessControlArgs{
    			AccessControl: &tencentcloud.TseCngwNetworkAccessControlAccessControlArgs{
    				CidrWhiteLists: pulumi.StringArray{
    					pulumi.String("1.1.1.0"),
    				},
    				Mode: pulumi.String("Whitelist"),
    			},
    			GatewayId: pulumi.String("gateway-cf8c99c3"),
    			GroupId:   pulumi.String("group-a160d123"),
    			NetworkId: pulumi.String("network-372b1e84"),
    		})
    		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 cngwNetworkAccessControl = new Tencentcloud.TseCngwNetworkAccessControl("cngwNetworkAccessControl", new()
        {
            AccessControl = new Tencentcloud.Inputs.TseCngwNetworkAccessControlAccessControlArgs
            {
                CidrWhiteLists = new[]
                {
                    "1.1.1.0",
                },
                Mode = "Whitelist",
            },
            GatewayId = "gateway-cf8c99c3",
            GroupId = "group-a160d123",
            NetworkId = "network-372b1e84",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TseCngwNetworkAccessControl;
    import com.pulumi.tencentcloud.TseCngwNetworkAccessControlArgs;
    import com.pulumi.tencentcloud.inputs.TseCngwNetworkAccessControlAccessControlArgs;
    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 cngwNetworkAccessControl = new TseCngwNetworkAccessControl("cngwNetworkAccessControl", TseCngwNetworkAccessControlArgs.builder()
                .accessControl(TseCngwNetworkAccessControlAccessControlArgs.builder()
                    .cidrWhiteLists("1.1.1.0")
                    .mode("Whitelist")
                    .build())
                .gatewayId("gateway-cf8c99c3")
                .groupId("group-a160d123")
                .networkId("network-372b1e84")
                .build());
    
        }
    }
    
    resources:
      cngwNetworkAccessControl:
        type: tencentcloud:TseCngwNetworkAccessControl
        properties:
          accessControl:
            cidrWhiteLists:
              - 1.1.1.0
            mode: Whitelist
          gatewayId: gateway-cf8c99c3
          groupId: group-a160d123
          networkId: network-372b1e84
    

    Create TseCngwNetworkAccessControl Resource

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

    Constructor syntax

    new TseCngwNetworkAccessControl(name: string, args: TseCngwNetworkAccessControlArgs, opts?: CustomResourceOptions);
    @overload
    def TseCngwNetworkAccessControl(resource_name: str,
                                    args: TseCngwNetworkAccessControlArgs,
                                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def TseCngwNetworkAccessControl(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    gateway_id: Optional[str] = None,
                                    group_id: Optional[str] = None,
                                    network_id: Optional[str] = None,
                                    access_control: Optional[TseCngwNetworkAccessControlAccessControlArgs] = None,
                                    tse_cngw_network_access_control_id: Optional[str] = None)
    func NewTseCngwNetworkAccessControl(ctx *Context, name string, args TseCngwNetworkAccessControlArgs, opts ...ResourceOption) (*TseCngwNetworkAccessControl, error)
    public TseCngwNetworkAccessControl(string name, TseCngwNetworkAccessControlArgs args, CustomResourceOptions? opts = null)
    public TseCngwNetworkAccessControl(String name, TseCngwNetworkAccessControlArgs args)
    public TseCngwNetworkAccessControl(String name, TseCngwNetworkAccessControlArgs args, CustomResourceOptions options)
    
    type: tencentcloud:TseCngwNetworkAccessControl
    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 TseCngwNetworkAccessControlArgs
    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 TseCngwNetworkAccessControlArgs
    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 TseCngwNetworkAccessControlArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TseCngwNetworkAccessControlArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TseCngwNetworkAccessControlArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    GatewayId string
    gateway ID.
    GroupId string
    gateway group ID.
    NetworkId string
    network id.
    AccessControl TseCngwNetworkAccessControlAccessControl
    access control policy.
    TseCngwNetworkAccessControlId string
    ID of the resource.
    GatewayId string
    gateway ID.
    GroupId string
    gateway group ID.
    NetworkId string
    network id.
    AccessControl TseCngwNetworkAccessControlAccessControlArgs
    access control policy.
    TseCngwNetworkAccessControlId string
    ID of the resource.
    gatewayId String
    gateway ID.
    groupId String
    gateway group ID.
    networkId String
    network id.
    accessControl TseCngwNetworkAccessControlAccessControl
    access control policy.
    tseCngwNetworkAccessControlId String
    ID of the resource.
    gatewayId string
    gateway ID.
    groupId string
    gateway group ID.
    networkId string
    network id.
    accessControl TseCngwNetworkAccessControlAccessControl
    access control policy.
    tseCngwNetworkAccessControlId string
    ID of the resource.
    gateway_id str
    gateway ID.
    group_id str
    gateway group ID.
    network_id str
    network id.
    access_control TseCngwNetworkAccessControlAccessControlArgs
    access control policy.
    tse_cngw_network_access_control_id str
    ID of the resource.
    gatewayId String
    gateway ID.
    groupId String
    gateway group ID.
    networkId String
    network id.
    accessControl Property Map
    access control policy.
    tseCngwNetworkAccessControlId String
    ID of the resource.

    Outputs

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

    Get an existing TseCngwNetworkAccessControl 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?: TseCngwNetworkAccessControlState, opts?: CustomResourceOptions): TseCngwNetworkAccessControl
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_control: Optional[TseCngwNetworkAccessControlAccessControlArgs] = None,
            gateway_id: Optional[str] = None,
            group_id: Optional[str] = None,
            network_id: Optional[str] = None,
            tse_cngw_network_access_control_id: Optional[str] = None) -> TseCngwNetworkAccessControl
    func GetTseCngwNetworkAccessControl(ctx *Context, name string, id IDInput, state *TseCngwNetworkAccessControlState, opts ...ResourceOption) (*TseCngwNetworkAccessControl, error)
    public static TseCngwNetworkAccessControl Get(string name, Input<string> id, TseCngwNetworkAccessControlState? state, CustomResourceOptions? opts = null)
    public static TseCngwNetworkAccessControl get(String name, Output<String> id, TseCngwNetworkAccessControlState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:TseCngwNetworkAccessControl    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:
    AccessControl TseCngwNetworkAccessControlAccessControl
    access control policy.
    GatewayId string
    gateway ID.
    GroupId string
    gateway group ID.
    NetworkId string
    network id.
    TseCngwNetworkAccessControlId string
    ID of the resource.
    AccessControl TseCngwNetworkAccessControlAccessControlArgs
    access control policy.
    GatewayId string
    gateway ID.
    GroupId string
    gateway group ID.
    NetworkId string
    network id.
    TseCngwNetworkAccessControlId string
    ID of the resource.
    accessControl TseCngwNetworkAccessControlAccessControl
    access control policy.
    gatewayId String
    gateway ID.
    groupId String
    gateway group ID.
    networkId String
    network id.
    tseCngwNetworkAccessControlId String
    ID of the resource.
    accessControl TseCngwNetworkAccessControlAccessControl
    access control policy.
    gatewayId string
    gateway ID.
    groupId string
    gateway group ID.
    networkId string
    network id.
    tseCngwNetworkAccessControlId string
    ID of the resource.
    access_control TseCngwNetworkAccessControlAccessControlArgs
    access control policy.
    gateway_id str
    gateway ID.
    group_id str
    gateway group ID.
    network_id str
    network id.
    tse_cngw_network_access_control_id str
    ID of the resource.
    accessControl Property Map
    access control policy.
    gatewayId String
    gateway ID.
    groupId String
    gateway group ID.
    networkId String
    network id.
    tseCngwNetworkAccessControlId String
    ID of the resource.

    Supporting Types

    TseCngwNetworkAccessControlAccessControl, TseCngwNetworkAccessControlAccessControlArgs

    CidrBlackLists List<string>
    Black list.
    CidrWhiteLists List<string>
    White list.
    Mode string
    Access mode: Whitelist, Blacklist.
    CidrBlackLists []string
    Black list.
    CidrWhiteLists []string
    White list.
    Mode string
    Access mode: Whitelist, Blacklist.
    cidrBlackLists List<String>
    Black list.
    cidrWhiteLists List<String>
    White list.
    mode String
    Access mode: Whitelist, Blacklist.
    cidrBlackLists string[]
    Black list.
    cidrWhiteLists string[]
    White list.
    mode string
    Access mode: Whitelist, Blacklist.
    cidr_black_lists Sequence[str]
    Black list.
    cidr_white_lists Sequence[str]
    White list.
    mode str
    Access mode: Whitelist, Blacklist.
    cidrBlackLists List<String>
    Black list.
    cidrWhiteLists List<String>
    White list.
    mode String
    Access mode: Whitelist, Blacklist.

    Import

    tse cngw_route_rate_limit can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/tseCngwNetworkAccessControl:TseCngwNetworkAccessControl cngw_network_access_control gatewayId#groupId#networkId
    

    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