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",
});
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:
- Acl
Config AntiddosPort Acl Config Acl Config - Port ACL Policy.
- Instance
Id string - InstanceIdList.
- Antiddos
Port stringAcl Config Id - ID of the resource.
- Acl
Config AntiddosPort Acl Config Acl Config Args - Port ACL Policy.
- Instance
Id string - InstanceIdList.
- Antiddos
Port stringAcl Config Id - ID of the resource.
- acl
Config AntiddosPort Acl Config Acl Config - Port ACL Policy.
- instance
Id String - InstanceIdList.
- antiddos
Port StringAcl Config Id - ID of the resource.
- acl
Config AntiddosPort Acl Config Acl Config - Port ACL Policy.
- instance
Id string - InstanceIdList.
- antiddos
Port stringAcl Config Id - ID of the resource.
- acl_
config AntiddosPort Acl Config Acl Config Args - Port ACL Policy.
- instance_
id str - InstanceIdList.
- antiddos_
port_ stracl_ config_ id - ID of the resource.
- acl
Config Property Map - Port ACL Policy.
- instance
Id String - InstanceIdList.
- antiddos
Port StringAcl Config Id - 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.
- Acl
Config AntiddosPort Acl Config Acl Config - Port ACL Policy.
- Antiddos
Port stringAcl Config Id - ID of the resource.
- Instance
Id string - InstanceIdList.
- Acl
Config AntiddosPort Acl Config Acl Config Args - Port ACL Policy.
- Antiddos
Port stringAcl Config Id - ID of the resource.
- Instance
Id string - InstanceIdList.
- acl
Config AntiddosPort Acl Config Acl Config - Port ACL Policy.
- antiddos
Port StringAcl Config Id - ID of the resource.
- instance
Id String - InstanceIdList.
- acl
Config AntiddosPort Acl Config Acl Config - Port ACL Policy.
- antiddos
Port stringAcl Config Id - ID of the resource.
- instance
Id string - InstanceIdList.
- acl_
config AntiddosPort Acl Config Acl Config Args - Port ACL Policy.
- antiddos_
port_ stracl_ config_ id - ID of the resource.
- instance_
id str - InstanceIdList.
- acl
Config Property Map - Port ACL Policy.
- antiddos
Port StringAcl Config Id - ID of the resource.
- instance
Id String - InstanceIdList.
Supporting Types
AntiddosPortAclConfigAclConfig, AntiddosPortAclConfigAclConfigArgs
- Action string
- Action, can take values: drop, transmit, forward.
- DPort
End double - end from port, with a range of 0~65535 values.
- DPort
Start double - Starting from port, with a range of 0~65535 values.
- Forward
Protocol string - Protocol type, can take TCP, udp, all values.
- SPort
End double - end from the source port, with a value range of 0~65535.
- SPort
Start 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.
- DPort
End float64 - end from port, with a range of 0~65535 values.
- DPort
Start float64 - Starting from port, with a range of 0~65535 values.
- Forward
Protocol string - Protocol type, can take TCP, udp, all values.
- SPort
End float64 - end from the source port, with a value range of 0~65535.
- SPort
Start 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.
- d
Port DoubleEnd - end from port, with a range of 0~65535 values.
- d
Port DoubleStart - Starting from port, with a range of 0~65535 values.
- forward
Protocol String - Protocol type, can take TCP, udp, all values.
- s
Port DoubleEnd - end from the source port, with a value range of 0~65535.
- s
Port DoubleStart - 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.
- d
Port numberEnd - end from port, with a range of 0~65535 values.
- d
Port numberStart - Starting from port, with a range of 0~65535 values.
- forward
Protocol string - Protocol type, can take TCP, udp, all values.
- s
Port numberEnd - end from the source port, with a value range of 0~65535.
- s
Port numberStart - 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_ floatend - end from port, with a range of 0~65535 values.
- d_
port_ floatstart - Starting from port, with a range of 0~65535 values.
- forward_
protocol str - Protocol type, can take TCP, udp, all values.
- s_
port_ floatend - end from the source port, with a value range of 0~65535.
- s_
port_ floatstart - 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.
- d
Port NumberEnd - end from port, with a range of 0~65535 values.
- d
Port NumberStart - Starting from port, with a range of 0~65535 values.
- forward
Protocol String - Protocol type, can take TCP, udp, all values.
- s
Port NumberEnd - end from the source port, with a value range of 0~65535.
- s
Port NumberStart - 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.