volcengine.cloud_firewall.CfwVpcFirewallAclRulePriority
Explore with Pulumi AI
Provides a resource to manage cfw vpc firewall acl rule priority
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const fooCfwAddressBook = new volcengine.cloud_firewall.CfwAddressBook("fooCfwAddressBook", {
groupName: "acc-test-address-book",
description: "acc-test",
groupType: "ip",
addressLists: [
"192.168.1.1",
"192.168.2.2",
],
});
const fooCfwVpcFirewallAclRule = new volcengine.cloud_firewall.CfwVpcFirewallAclRule("fooCfwVpcFirewallAclRule", {
vpcFirewallId: "vfw-ydmjakzksgf7u99j****",
action: "accept",
destinationType: "group",
destination: fooCfwAddressBook.id,
proto: "TCP",
sourceType: "net",
source: "0.0.0.0/0",
description: "acc-test-control-policy",
destPortType: "port",
destPort: "300",
repeatType: "Weekly",
repeatStartTime: "01:00",
repeatEndTime: "11:00",
repeatDays: [
2,
5,
],
startTime: 1736092800,
endTime: 1738339140,
priority: 1,
status: true,
});
const fooCfwVpcFirewallAclRulePriority = new volcengine.cloud_firewall.CfwVpcFirewallAclRulePriority("fooCfwVpcFirewallAclRulePriority", {
vpcFirewallId: "vfw-ydmjakzksgf7u99j****",
ruleId: fooCfwVpcFirewallAclRule.ruleId,
newPrio: 3,
});
import pulumi
import pulumi_volcengine as volcengine
foo_cfw_address_book = volcengine.cloud_firewall.CfwAddressBook("fooCfwAddressBook",
group_name="acc-test-address-book",
description="acc-test",
group_type="ip",
address_lists=[
"192.168.1.1",
"192.168.2.2",
])
foo_cfw_vpc_firewall_acl_rule = volcengine.cloud_firewall.CfwVpcFirewallAclRule("fooCfwVpcFirewallAclRule",
vpc_firewall_id="vfw-ydmjakzksgf7u99j****",
action="accept",
destination_type="group",
destination=foo_cfw_address_book.id,
proto="TCP",
source_type="net",
source="0.0.0.0/0",
description="acc-test-control-policy",
dest_port_type="port",
dest_port="300",
repeat_type="Weekly",
repeat_start_time="01:00",
repeat_end_time="11:00",
repeat_days=[
2,
5,
],
start_time=1736092800,
end_time=1738339140,
priority=1,
status=True)
foo_cfw_vpc_firewall_acl_rule_priority = volcengine.cloud_firewall.CfwVpcFirewallAclRulePriority("fooCfwVpcFirewallAclRulePriority",
vpc_firewall_id="vfw-ydmjakzksgf7u99j****",
rule_id=foo_cfw_vpc_firewall_acl_rule.rule_id,
new_prio=3)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cloud_firewall"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooCfwAddressBook, err := cloud_firewall.NewCfwAddressBook(ctx, "fooCfwAddressBook", &cloud_firewall.CfwAddressBookArgs{
GroupName: pulumi.String("acc-test-address-book"),
Description: pulumi.String("acc-test"),
GroupType: pulumi.String("ip"),
AddressLists: pulumi.StringArray{
pulumi.String("192.168.1.1"),
pulumi.String("192.168.2.2"),
},
})
if err != nil {
return err
}
fooCfwVpcFirewallAclRule, err := cloud_firewall.NewCfwVpcFirewallAclRule(ctx, "fooCfwVpcFirewallAclRule", &cloud_firewall.CfwVpcFirewallAclRuleArgs{
VpcFirewallId: pulumi.String("vfw-ydmjakzksgf7u99j****"),
Action: pulumi.String("accept"),
DestinationType: pulumi.String("group"),
Destination: fooCfwAddressBook.ID(),
Proto: pulumi.String("TCP"),
SourceType: pulumi.String("net"),
Source: pulumi.String("0.0.0.0/0"),
Description: pulumi.String("acc-test-control-policy"),
DestPortType: pulumi.String("port"),
DestPort: pulumi.String("300"),
RepeatType: pulumi.String("Weekly"),
RepeatStartTime: pulumi.String("01:00"),
RepeatEndTime: pulumi.String("11:00"),
RepeatDays: pulumi.IntArray{
pulumi.Int(2),
pulumi.Int(5),
},
StartTime: pulumi.Int(1736092800),
EndTime: pulumi.Int(1738339140),
Priority: pulumi.Int(1),
Status: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = cloud_firewall.NewCfwVpcFirewallAclRulePriority(ctx, "fooCfwVpcFirewallAclRulePriority", &cloud_firewall.CfwVpcFirewallAclRulePriorityArgs{
VpcFirewallId: pulumi.String("vfw-ydmjakzksgf7u99j****"),
RuleId: fooCfwVpcFirewallAclRule.RuleId,
NewPrio: pulumi.Int(3),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooCfwAddressBook = new Volcengine.Cloud_firewall.CfwAddressBook("fooCfwAddressBook", new()
{
GroupName = "acc-test-address-book",
Description = "acc-test",
GroupType = "ip",
AddressLists = new[]
{
"192.168.1.1",
"192.168.2.2",
},
});
var fooCfwVpcFirewallAclRule = new Volcengine.Cloud_firewall.CfwVpcFirewallAclRule("fooCfwVpcFirewallAclRule", new()
{
VpcFirewallId = "vfw-ydmjakzksgf7u99j****",
Action = "accept",
DestinationType = "group",
Destination = fooCfwAddressBook.Id,
Proto = "TCP",
SourceType = "net",
Source = "0.0.0.0/0",
Description = "acc-test-control-policy",
DestPortType = "port",
DestPort = "300",
RepeatType = "Weekly",
RepeatStartTime = "01:00",
RepeatEndTime = "11:00",
RepeatDays = new[]
{
2,
5,
},
StartTime = 1736092800,
EndTime = 1738339140,
Priority = 1,
Status = true,
});
var fooCfwVpcFirewallAclRulePriority = new Volcengine.Cloud_firewall.CfwVpcFirewallAclRulePriority("fooCfwVpcFirewallAclRulePriority", new()
{
VpcFirewallId = "vfw-ydmjakzksgf7u99j****",
RuleId = fooCfwVpcFirewallAclRule.RuleId,
NewPrio = 3,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.cloud_firewall.CfwAddressBook;
import com.pulumi.volcengine.cloud_firewall.CfwAddressBookArgs;
import com.pulumi.volcengine.cloud_firewall.CfwVpcFirewallAclRule;
import com.pulumi.volcengine.cloud_firewall.CfwVpcFirewallAclRuleArgs;
import com.pulumi.volcengine.cloud_firewall.CfwVpcFirewallAclRulePriority;
import com.pulumi.volcengine.cloud_firewall.CfwVpcFirewallAclRulePriorityArgs;
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 fooCfwAddressBook = new CfwAddressBook("fooCfwAddressBook", CfwAddressBookArgs.builder()
.groupName("acc-test-address-book")
.description("acc-test")
.groupType("ip")
.addressLists(
"192.168.1.1",
"192.168.2.2")
.build());
var fooCfwVpcFirewallAclRule = new CfwVpcFirewallAclRule("fooCfwVpcFirewallAclRule", CfwVpcFirewallAclRuleArgs.builder()
.vpcFirewallId("vfw-ydmjakzksgf7u99j****")
.action("accept")
.destinationType("group")
.destination(fooCfwAddressBook.id())
.proto("TCP")
.sourceType("net")
.source("0.0.0.0/0")
.description("acc-test-control-policy")
.destPortType("port")
.destPort("300")
.repeatType("Weekly")
.repeatStartTime("01:00")
.repeatEndTime("11:00")
.repeatDays(
2,
5)
.startTime(1736092800)
.endTime(1738339140)
.priority(1)
.status(true)
.build());
var fooCfwVpcFirewallAclRulePriority = new CfwVpcFirewallAclRulePriority("fooCfwVpcFirewallAclRulePriority", CfwVpcFirewallAclRulePriorityArgs.builder()
.vpcFirewallId("vfw-ydmjakzksgf7u99j****")
.ruleId(fooCfwVpcFirewallAclRule.ruleId())
.newPrio(3)
.build());
}
}
resources:
fooCfwAddressBook:
type: volcengine:cloud_firewall:CfwAddressBook
properties:
groupName: acc-test-address-book
description: acc-test
groupType: ip
addressLists:
- 192.168.1.1
- 192.168.2.2
fooCfwVpcFirewallAclRule:
type: volcengine:cloud_firewall:CfwVpcFirewallAclRule
properties:
vpcFirewallId: vfw-ydmjakzksgf7u99j****
action: accept
destinationType: group
destination: ${fooCfwAddressBook.id}
proto: TCP
sourceType: net
source: 0.0.0.0/0
description: acc-test-control-policy
destPortType: port
destPort: '300'
repeatType: Weekly
repeatStartTime: 01:00
repeatEndTime: 11:00
repeatDays:
- 2
- 5
startTime: 1.7360928e+09
endTime: 1.73833914e+09
priority: 1
status: true
fooCfwVpcFirewallAclRulePriority:
type: volcengine:cloud_firewall:CfwVpcFirewallAclRulePriority
properties:
vpcFirewallId: vfw-ydmjakzksgf7u99j****
ruleId: ${fooCfwVpcFirewallAclRule.ruleId}
newPrio: 3
Create CfwVpcFirewallAclRulePriority Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CfwVpcFirewallAclRulePriority(name: string, args: CfwVpcFirewallAclRulePriorityArgs, opts?: CustomResourceOptions);
@overload
def CfwVpcFirewallAclRulePriority(resource_name: str,
args: CfwVpcFirewallAclRulePriorityArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CfwVpcFirewallAclRulePriority(resource_name: str,
opts: Optional[ResourceOptions] = None,
rule_id: Optional[str] = None,
vpc_firewall_id: Optional[str] = None,
new_prio: Optional[int] = None)
func NewCfwVpcFirewallAclRulePriority(ctx *Context, name string, args CfwVpcFirewallAclRulePriorityArgs, opts ...ResourceOption) (*CfwVpcFirewallAclRulePriority, error)
public CfwVpcFirewallAclRulePriority(string name, CfwVpcFirewallAclRulePriorityArgs args, CustomResourceOptions? opts = null)
public CfwVpcFirewallAclRulePriority(String name, CfwVpcFirewallAclRulePriorityArgs args)
public CfwVpcFirewallAclRulePriority(String name, CfwVpcFirewallAclRulePriorityArgs args, CustomResourceOptions options)
type: volcengine:cloud_firewall:CfwVpcFirewallAclRulePriority
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 CfwVpcFirewallAclRulePriorityArgs
- 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 CfwVpcFirewallAclRulePriorityArgs
- 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 CfwVpcFirewallAclRulePriorityArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CfwVpcFirewallAclRulePriorityArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CfwVpcFirewallAclRulePriorityArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var cfwVpcFirewallAclRulePriorityResource = new Volcengine.Cloud_firewall.CfwVpcFirewallAclRulePriority("cfwVpcFirewallAclRulePriorityResource", new()
{
RuleId = "string",
VpcFirewallId = "string",
NewPrio = 0,
});
example, err := cloud_firewall.NewCfwVpcFirewallAclRulePriority(ctx, "cfwVpcFirewallAclRulePriorityResource", &cloud_firewall.CfwVpcFirewallAclRulePriorityArgs{
RuleId: pulumi.String("string"),
VpcFirewallId: pulumi.String("string"),
NewPrio: pulumi.Int(0),
})
var cfwVpcFirewallAclRulePriorityResource = new CfwVpcFirewallAclRulePriority("cfwVpcFirewallAclRulePriorityResource", CfwVpcFirewallAclRulePriorityArgs.builder()
.ruleId("string")
.vpcFirewallId("string")
.newPrio(0)
.build());
cfw_vpc_firewall_acl_rule_priority_resource = volcengine.cloud_firewall.CfwVpcFirewallAclRulePriority("cfwVpcFirewallAclRulePriorityResource",
rule_id="string",
vpc_firewall_id="string",
new_prio=0)
const cfwVpcFirewallAclRulePriorityResource = new volcengine.cloud_firewall.CfwVpcFirewallAclRulePriority("cfwVpcFirewallAclRulePriorityResource", {
ruleId: "string",
vpcFirewallId: "string",
newPrio: 0,
});
type: volcengine:cloud_firewall:CfwVpcFirewallAclRulePriority
properties:
newPrio: 0
ruleId: string
vpcFirewallId: string
CfwVpcFirewallAclRulePriority 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 CfwVpcFirewallAclRulePriority resource accepts the following input properties:
- Rule
Id string - The rule id of the vpc firewall acl rule.
- Vpc
Firewall stringId - The id of the vpc firewall.
- New
Prio int - The new priority of the vpc firewall acl rule. The priority increases in order from 1, with lower priority indicating higher priority.
- Rule
Id string - The rule id of the vpc firewall acl rule.
- Vpc
Firewall stringId - The id of the vpc firewall.
- New
Prio int - The new priority of the vpc firewall acl rule. The priority increases in order from 1, with lower priority indicating higher priority.
- rule
Id String - The rule id of the vpc firewall acl rule.
- vpc
Firewall StringId - The id of the vpc firewall.
- new
Prio Integer - The new priority of the vpc firewall acl rule. The priority increases in order from 1, with lower priority indicating higher priority.
- rule
Id string - The rule id of the vpc firewall acl rule.
- vpc
Firewall stringId - The id of the vpc firewall.
- new
Prio number - The new priority of the vpc firewall acl rule. The priority increases in order from 1, with lower priority indicating higher priority.
- rule_
id str - The rule id of the vpc firewall acl rule.
- vpc_
firewall_ strid - The id of the vpc firewall.
- new_
prio int - The new priority of the vpc firewall acl rule. The priority increases in order from 1, with lower priority indicating higher priority.
- rule
Id String - The rule id of the vpc firewall acl rule.
- vpc
Firewall StringId - The id of the vpc firewall.
- new
Prio Number - The new priority of the vpc firewall acl rule. The priority increases in order from 1, with lower priority indicating higher priority.
Outputs
All input properties are implicitly available as output properties. Additionally, the CfwVpcFirewallAclRulePriority resource produces the following output properties:
Look up Existing CfwVpcFirewallAclRulePriority Resource
Get an existing CfwVpcFirewallAclRulePriority 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?: CfwVpcFirewallAclRulePriorityState, opts?: CustomResourceOptions): CfwVpcFirewallAclRulePriority
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
new_prio: Optional[int] = None,
prio: Optional[int] = None,
rule_id: Optional[str] = None,
vpc_firewall_id: Optional[str] = None) -> CfwVpcFirewallAclRulePriority
func GetCfwVpcFirewallAclRulePriority(ctx *Context, name string, id IDInput, state *CfwVpcFirewallAclRulePriorityState, opts ...ResourceOption) (*CfwVpcFirewallAclRulePriority, error)
public static CfwVpcFirewallAclRulePriority Get(string name, Input<string> id, CfwVpcFirewallAclRulePriorityState? state, CustomResourceOptions? opts = null)
public static CfwVpcFirewallAclRulePriority get(String name, Output<String> id, CfwVpcFirewallAclRulePriorityState state, CustomResourceOptions options)
resources: _: type: volcengine:cloud_firewall:CfwVpcFirewallAclRulePriority 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.
- New
Prio int - The new priority of the vpc firewall acl rule. The priority increases in order from 1, with lower priority indicating higher priority.
- Prio int
- The priority of the vpc firewall acl rule.
- Rule
Id string - The rule id of the vpc firewall acl rule.
- Vpc
Firewall stringId - The id of the vpc firewall.
- New
Prio int - The new priority of the vpc firewall acl rule. The priority increases in order from 1, with lower priority indicating higher priority.
- Prio int
- The priority of the vpc firewall acl rule.
- Rule
Id string - The rule id of the vpc firewall acl rule.
- Vpc
Firewall stringId - The id of the vpc firewall.
- new
Prio Integer - The new priority of the vpc firewall acl rule. The priority increases in order from 1, with lower priority indicating higher priority.
- prio Integer
- The priority of the vpc firewall acl rule.
- rule
Id String - The rule id of the vpc firewall acl rule.
- vpc
Firewall StringId - The id of the vpc firewall.
- new
Prio number - The new priority of the vpc firewall acl rule. The priority increases in order from 1, with lower priority indicating higher priority.
- prio number
- The priority of the vpc firewall acl rule.
- rule
Id string - The rule id of the vpc firewall acl rule.
- vpc
Firewall stringId - The id of the vpc firewall.
- new_
prio int - The new priority of the vpc firewall acl rule. The priority increases in order from 1, with lower priority indicating higher priority.
- prio int
- The priority of the vpc firewall acl rule.
- rule_
id str - The rule id of the vpc firewall acl rule.
- vpc_
firewall_ strid - The id of the vpc firewall.
- new
Prio Number - The new priority of the vpc firewall acl rule. The priority increases in order from 1, with lower priority indicating higher priority.
- prio Number
- The priority of the vpc firewall acl rule.
- rule
Id String - The rule id of the vpc firewall acl rule.
- vpc
Firewall StringId - The id of the vpc firewall.
Import
VpcFirewallAclRulePriority can be imported using the vpc_firewall_id:rule_id, e.g.
$ pulumi import volcengine:cloud_firewall/cfwVpcFirewallAclRulePriority:CfwVpcFirewallAclRulePriority default resource_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.