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

tencentcloud.AntiddosPortAclConfig

Explore with Pulumi AI

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

    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",
    });
    
    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")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    resources:
      portAclConfig:
        type: tencentcloud:AntiddosPortAclConfig
        properties:
          aclConfig:
            action: drop
            dPortEnd: 23
            dPortStart: 22
            forwardProtocol: all
            priority: 2
            sPortEnd: 23
            sPortStart: 22
          instanceId: bgp-xxxxxx
    

    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 string
    The unique name of the resource.
    args AntiddosPortAclConfigArgs
    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 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 string
    The unique name of the resource.
    args AntiddosPortAclConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AntiddosPortAclConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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 AntiddosPortAclConfigAclConfig
    Port ACL Policy.
    InstanceId string
    InstanceIdList.
    AntiddosPortAclConfigId string
    ID of the resource.
    AclConfig AntiddosPortAclConfigAclConfigArgs
    Port ACL Policy.
    InstanceId string
    InstanceIdList.
    AntiddosPortAclConfigId string
    ID of the resource.
    aclConfig AntiddosPortAclConfigAclConfig
    Port ACL Policy.
    instanceId String
    InstanceIdList.
    antiddosPortAclConfigId String
    ID of the resource.
    aclConfig AntiddosPortAclConfigAclConfig
    Port ACL Policy.
    instanceId string
    InstanceIdList.
    antiddosPortAclConfigId string
    ID of the resource.
    acl_config AntiddosPortAclConfigAclConfigArgs
    Port ACL Policy.
    instance_id str
    InstanceIdList.
    antiddos_port_acl_config_id str
    ID of the resource.
    aclConfig Property Map
    Port ACL Policy.
    instanceId 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
    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:
    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 string
    Action, can take values: drop, transmit, forward.
    DPortEnd double
    end from port, with a range of 0~65535 values.
    DPortStart double
    Starting from port, with a range of 0~65535 values.
    ForwardProtocol string
    Protocol type, can take TCP, udp, all values.
    SPortEnd double
    end from the source port, with a value range of 0~65535.
    SPortStart 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 string
    Action, can take values: drop, transmit, forward.
    DPortEnd float64
    end from port, with a range of 0~65535 values.
    DPortStart float64
    Starting from port, with a range of 0~65535 values.
    ForwardProtocol string
    Protocol type, can take TCP, udp, all values.
    SPortEnd float64
    end from the source port, with a value range of 0~65535.
    SPortStart 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 String
    Action, can take values: drop, transmit, forward.
    dPortEnd Double
    end from port, with a range of 0~65535 values.
    dPortStart Double
    Starting from port, with a range of 0~65535 values.
    forwardProtocol String
    Protocol type, can take TCP, udp, all values.
    sPortEnd Double
    end from the source port, with a value range of 0~65535.
    sPortStart 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 string
    Action, can take values: drop, transmit, forward.
    dPortEnd number
    end from port, with a range of 0~65535 values.
    dPortStart number
    Starting from port, with a range of 0~65535 values.
    forwardProtocol string
    Protocol type, can take TCP, udp, all values.
    sPortEnd number
    end from the source port, with a value range of 0~65535.
    sPortStart 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 str
    Action, can take values: drop, transmit, forward.
    d_port_end float
    end from port, with a range of 0~65535 values.
    d_port_start float
    Starting from port, with a range of 0~65535 values.
    forward_protocol str
    Protocol type, can take TCP, udp, all values.
    s_port_end float
    end from the source port, with a value range of 0~65535.
    s_port_start 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 String
    Action, can take values: drop, transmit, forward.
    dPortEnd Number
    end from port, with a range of 0~65535 values.
    dPortStart Number
    Starting from port, with a range of 0~65535 values.
    forwardProtocol String
    Protocol type, can take TCP, udp, all values.
    sPortEnd Number
    end from the source port, with a value range of 0~65535.
    sPortStart 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}
    

    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