1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. AntiddosPortAclConfig
tencentcloud 1.81.182 published on Monday, Apr 14, 2025 by tencentcloudstack

tencentcloud.AntiddosPortAclConfig

Explore with Pulumi AI

Provides a resource to create a antiddos port acl config

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const portAclConfig = new tencentcloud.AntiddosPortAclConfig("portAclConfig", {
    aclConfig: {
        action: "drop",
        dPortEnd: 23,
        dPortStart: 22,
        forwardProtocol: "all",
        priority: 2,
        sPortEnd: 23,
        sPortStart: 22,
    },
    instanceId: "bgp-xxxxxx",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

port_acl_config = tencentcloud.AntiddosPortAclConfig("portAclConfig",
    acl_config={
        "action": "drop",
        "d_port_end": 23,
        "d_port_start": 22,
        "forward_protocol": "all",
        "priority": 2,
        "s_port_end": 23,
        "s_port_start": 22,
    },
    instance_id="bgp-xxxxxx")
Copy
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.NewAntiddosPortAclConfig(ctx, "portAclConfig", &tencentcloud.AntiddosPortAclConfigArgs{
			AclConfig: &tencentcloud.AntiddosPortAclConfigAclConfigArgs{
				Action:          pulumi.String("drop"),
				DPortEnd:        pulumi.Float64(23),
				DPortStart:      pulumi.Float64(22),
				ForwardProtocol: pulumi.String("all"),
				Priority:        pulumi.Float64(2),
				SPortEnd:        pulumi.Float64(23),
				SPortStart:      pulumi.Float64(22),
			},
			InstanceId: pulumi.String("bgp-xxxxxx"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var portAclConfig = new Tencentcloud.AntiddosPortAclConfig("portAclConfig", new()
    {
        AclConfig = new Tencentcloud.Inputs.AntiddosPortAclConfigAclConfigArgs
        {
            Action = "drop",
            DPortEnd = 23,
            DPortStart = 22,
            ForwardProtocol = "all",
            Priority = 2,
            SPortEnd = 23,
            SPortStart = 22,
        },
        InstanceId = "bgp-xxxxxx",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.AntiddosPortAclConfig;
import com.pulumi.tencentcloud.AntiddosPortAclConfigArgs;
import com.pulumi.tencentcloud.inputs.AntiddosPortAclConfigAclConfigArgs;
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 portAclConfig = new AntiddosPortAclConfig("portAclConfig", AntiddosPortAclConfigArgs.builder()
            .aclConfig(AntiddosPortAclConfigAclConfigArgs.builder()
                .action("drop")
                .dPortEnd(23)
                .dPortStart(22)
                .forwardProtocol("all")
                .priority(2)
                .sPortEnd(23)
                .sPortStart(22)
                .build())
            .instanceId("bgp-xxxxxx")
            .build());

    }
}
Copy
resources:
  portAclConfig:
    type: tencentcloud:AntiddosPortAclConfig
    properties:
      aclConfig:
        action: drop
        dPortEnd: 23
        dPortStart: 22
        forwardProtocol: all
        priority: 2
        sPortEnd: 23
        sPortStart: 22
      instanceId: bgp-xxxxxx
Copy

Create AntiddosPortAclConfig Resource

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

Constructor syntax

new AntiddosPortAclConfig(name: string, args: AntiddosPortAclConfigArgs, opts?: CustomResourceOptions);
@overload
def AntiddosPortAclConfig(resource_name: str,
                          args: AntiddosPortAclConfigArgs,
                          opts: Optional[ResourceOptions] = None)

@overload
def AntiddosPortAclConfig(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          acl_config: Optional[AntiddosPortAclConfigAclConfigArgs] = None,
                          instance_id: Optional[str] = None,
                          antiddos_port_acl_config_id: Optional[str] = None)
func NewAntiddosPortAclConfig(ctx *Context, name string, args AntiddosPortAclConfigArgs, opts ...ResourceOption) (*AntiddosPortAclConfig, error)
public AntiddosPortAclConfig(string name, AntiddosPortAclConfigArgs args, CustomResourceOptions? opts = null)
public AntiddosPortAclConfig(String name, AntiddosPortAclConfigArgs args)
public AntiddosPortAclConfig(String name, AntiddosPortAclConfigArgs args, CustomResourceOptions options)
type: tencentcloud:AntiddosPortAclConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AntiddosPortAclConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AntiddosPortAclConfigArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AntiddosPortAclConfigArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AntiddosPortAclConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AntiddosPortAclConfigArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

AclConfig This property is required. AntiddosPortAclConfigAclConfig
Port ACL Policy.
InstanceId This property is required. string
InstanceIdList.
AntiddosPortAclConfigId string
ID of the resource.
AclConfig This property is required. AntiddosPortAclConfigAclConfigArgs
Port ACL Policy.
InstanceId This property is required. string
InstanceIdList.
AntiddosPortAclConfigId string
ID of the resource.
aclConfig This property is required. AntiddosPortAclConfigAclConfig
Port ACL Policy.
instanceId This property is required. String
InstanceIdList.
antiddosPortAclConfigId String
ID of the resource.
aclConfig This property is required. AntiddosPortAclConfigAclConfig
Port ACL Policy.
instanceId This property is required. string
InstanceIdList.
antiddosPortAclConfigId string
ID of the resource.
acl_config This property is required. AntiddosPortAclConfigAclConfigArgs
Port ACL Policy.
instance_id This property is required. str
InstanceIdList.
antiddos_port_acl_config_id str
ID of the resource.
aclConfig This property is required. Property Map
Port ACL Policy.
instanceId This property is required. String
InstanceIdList.
antiddosPortAclConfigId String
ID of the resource.

Outputs

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

Get an existing AntiddosPortAclConfig 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?: AntiddosPortAclConfigState, opts?: CustomResourceOptions): AntiddosPortAclConfig
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        acl_config: Optional[AntiddosPortAclConfigAclConfigArgs] = None,
        antiddos_port_acl_config_id: Optional[str] = None,
        instance_id: Optional[str] = None) -> AntiddosPortAclConfig
func GetAntiddosPortAclConfig(ctx *Context, name string, id IDInput, state *AntiddosPortAclConfigState, opts ...ResourceOption) (*AntiddosPortAclConfig, error)
public static AntiddosPortAclConfig Get(string name, Input<string> id, AntiddosPortAclConfigState? state, CustomResourceOptions? opts = null)
public static AntiddosPortAclConfig get(String name, Output<String> id, AntiddosPortAclConfigState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:AntiddosPortAclConfig    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AclConfig AntiddosPortAclConfigAclConfig
Port ACL Policy.
AntiddosPortAclConfigId string
ID of the resource.
InstanceId string
InstanceIdList.
AclConfig AntiddosPortAclConfigAclConfigArgs
Port ACL Policy.
AntiddosPortAclConfigId string
ID of the resource.
InstanceId string
InstanceIdList.
aclConfig AntiddosPortAclConfigAclConfig
Port ACL Policy.
antiddosPortAclConfigId String
ID of the resource.
instanceId String
InstanceIdList.
aclConfig AntiddosPortAclConfigAclConfig
Port ACL Policy.
antiddosPortAclConfigId string
ID of the resource.
instanceId string
InstanceIdList.
acl_config AntiddosPortAclConfigAclConfigArgs
Port ACL Policy.
antiddos_port_acl_config_id str
ID of the resource.
instance_id str
InstanceIdList.
aclConfig Property Map
Port ACL Policy.
antiddosPortAclConfigId String
ID of the resource.
instanceId String
InstanceIdList.

Supporting Types

AntiddosPortAclConfigAclConfig
, AntiddosPortAclConfigAclConfigArgs

Action This property is required. string
Action, can take values: drop, transmit, forward.
DPortEnd This property is required. double
end from port, with a range of 0~65535 values.
DPortStart This property is required. double
Starting from port, with a range of 0~65535 values.
ForwardProtocol This property is required. string
Protocol type, can take TCP, udp, all values.
SPortEnd This property is required. double
end from the source port, with a value range of 0~65535.
SPortStart This property is required. double
Starting from the source port, with a value range of 0~65535.
Priority double
The policy priority, the smaller the number, the higher the level, and the higher the matching of the rule, with values ranging from 1 to 1000. Note: This field may return null, indicating that a valid value cannot be obtained.
Action This property is required. string
Action, can take values: drop, transmit, forward.
DPortEnd This property is required. float64
end from port, with a range of 0~65535 values.
DPortStart This property is required. float64
Starting from port, with a range of 0~65535 values.
ForwardProtocol This property is required. string
Protocol type, can take TCP, udp, all values.
SPortEnd This property is required. float64
end from the source port, with a value range of 0~65535.
SPortStart This property is required. float64
Starting from the source port, with a value range of 0~65535.
Priority float64
The policy priority, the smaller the number, the higher the level, and the higher the matching of the rule, with values ranging from 1 to 1000. Note: This field may return null, indicating that a valid value cannot be obtained.
action This property is required. String
Action, can take values: drop, transmit, forward.
dPortEnd This property is required. Double
end from port, with a range of 0~65535 values.
dPortStart This property is required. Double
Starting from port, with a range of 0~65535 values.
forwardProtocol This property is required. String
Protocol type, can take TCP, udp, all values.
sPortEnd This property is required. Double
end from the source port, with a value range of 0~65535.
sPortStart This property is required. Double
Starting from the source port, with a value range of 0~65535.
priority Double
The policy priority, the smaller the number, the higher the level, and the higher the matching of the rule, with values ranging from 1 to 1000. Note: This field may return null, indicating that a valid value cannot be obtained.
action This property is required. string
Action, can take values: drop, transmit, forward.
dPortEnd This property is required. number
end from port, with a range of 0~65535 values.
dPortStart This property is required. number
Starting from port, with a range of 0~65535 values.
forwardProtocol This property is required. string
Protocol type, can take TCP, udp, all values.
sPortEnd This property is required. number
end from the source port, with a value range of 0~65535.
sPortStart This property is required. number
Starting from the source port, with a value range of 0~65535.
priority number
The policy priority, the smaller the number, the higher the level, and the higher the matching of the rule, with values ranging from 1 to 1000. Note: This field may return null, indicating that a valid value cannot be obtained.
action This property is required. str
Action, can take values: drop, transmit, forward.
d_port_end This property is required. float
end from port, with a range of 0~65535 values.
d_port_start This property is required. float
Starting from port, with a range of 0~65535 values.
forward_protocol This property is required. str
Protocol type, can take TCP, udp, all values.
s_port_end This property is required. float
end from the source port, with a value range of 0~65535.
s_port_start This property is required. float
Starting from the source port, with a value range of 0~65535.
priority float
The policy priority, the smaller the number, the higher the level, and the higher the matching of the rule, with values ranging from 1 to 1000. Note: This field may return null, indicating that a valid value cannot be obtained.
action This property is required. String
Action, can take values: drop, transmit, forward.
dPortEnd This property is required. Number
end from port, with a range of 0~65535 values.
dPortStart This property is required. Number
Starting from port, with a range of 0~65535 values.
forwardProtocol This property is required. String
Protocol type, can take TCP, udp, all values.
sPortEnd This property is required. Number
end from the source port, with a value range of 0~65535.
sPortStart This property is required. Number
Starting from the source port, with a value range of 0~65535.
priority Number
The policy priority, the smaller the number, the higher the level, and the higher the matching of the rule, with values ranging from 1 to 1000. Note: This field may return null, indicating that a valid value cannot be obtained.

Import

antiddos port_acl_config can be imported using the id, e.g.

$ pulumi import tencentcloud:index/antiddosPortAclConfig:AntiddosPortAclConfig port_acl_config ${instanceId}#${configJson}
Copy

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.