tencentcloud.TseCngwNetworkAccessControl
Explore with Pulumi AI
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:
- Gateway
Id string - gateway ID.
- Group
Id string - gateway group ID.
- Network
Id string - network id.
- Access
Control TseCngw Network Access Control Access Control - access control policy.
- Tse
Cngw stringNetwork Access Control Id - ID of the resource.
- Gateway
Id string - gateway ID.
- Group
Id string - gateway group ID.
- Network
Id string - network id.
- Access
Control TseCngw Network Access Control Access Control Args - access control policy.
- Tse
Cngw stringNetwork Access Control Id - ID of the resource.
- gateway
Id String - gateway ID.
- group
Id String - gateway group ID.
- network
Id String - network id.
- access
Control TseCngw Network Access Control Access Control - access control policy.
- tse
Cngw StringNetwork Access Control Id - ID of the resource.
- gateway
Id string - gateway ID.
- group
Id string - gateway group ID.
- network
Id string - network id.
- access
Control TseCngw Network Access Control Access Control - access control policy.
- tse
Cngw stringNetwork Access Control Id - ID of the resource.
- gateway_
id str - gateway ID.
- group_
id str - gateway group ID.
- network_
id str - network id.
- access_
control TseCngw Network Access Control Access Control Args - access control policy.
- tse_
cngw_ strnetwork_ access_ control_ id - ID of the resource.
- gateway
Id String - gateway ID.
- group
Id String - gateway group ID.
- network
Id String - network id.
- access
Control Property Map - access control policy.
- tse
Cngw StringNetwork Access Control Id - 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.
- Access
Control TseCngw Network Access Control Access Control - access control policy.
- Gateway
Id string - gateway ID.
- Group
Id string - gateway group ID.
- Network
Id string - network id.
- Tse
Cngw stringNetwork Access Control Id - ID of the resource.
- Access
Control TseCngw Network Access Control Access Control Args - access control policy.
- Gateway
Id string - gateway ID.
- Group
Id string - gateway group ID.
- Network
Id string - network id.
- Tse
Cngw stringNetwork Access Control Id - ID of the resource.
- access
Control TseCngw Network Access Control Access Control - access control policy.
- gateway
Id String - gateway ID.
- group
Id String - gateway group ID.
- network
Id String - network id.
- tse
Cngw StringNetwork Access Control Id - ID of the resource.
- access
Control TseCngw Network Access Control Access Control - access control policy.
- gateway
Id string - gateway ID.
- group
Id string - gateway group ID.
- network
Id string - network id.
- tse
Cngw stringNetwork Access Control Id - ID of the resource.
- access_
control TseCngw Network Access Control Access Control Args - access control policy.
- gateway_
id str - gateway ID.
- group_
id str - gateway group ID.
- network_
id str - network id.
- tse_
cngw_ strnetwork_ access_ control_ id - ID of the resource.
- access
Control Property Map - access control policy.
- gateway
Id String - gateway ID.
- group
Id String - gateway group ID.
- network
Id String - network id.
- tse
Cngw StringNetwork Access Control Id - ID of the resource.
Supporting Types
TseCngwNetworkAccessControlAccessControl, TseCngwNetworkAccessControlAccessControlArgs
- Cidr
Black List<string>Lists - Black list.
- Cidr
White List<string>Lists - White list.
- Mode string
- Access mode:
Whitelist
,Blacklist
.
- Cidr
Black []stringLists - Black list.
- Cidr
White []stringLists - White list.
- Mode string
- Access mode:
Whitelist
,Blacklist
.
- cidr
Black List<String>Lists - Black list.
- cidr
White List<String>Lists - White list.
- mode String
- Access mode:
Whitelist
,Blacklist
.
- cidr
Black string[]Lists - Black list.
- cidr
White string[]Lists - White list.
- mode string
- Access mode:
Whitelist
,Blacklist
.
- cidr_
black_ Sequence[str]lists - Black list.
- cidr_
white_ Sequence[str]lists - White list.
- mode str
- Access mode:
Whitelist
,Blacklist
.
- cidr
Black List<String>Lists - Black list.
- cidr
White List<String>Lists - 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.