opentelekomcloud.CfwBlacklistWhitelistRuleV1
Explore with Pulumi AI
Up-to-date reference of API arguments for CFW blacklist/whitelist rule you can get at documentation portal
Manages a CFW blacklist/whitelist rule resource within OpenTelekomCloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const objectId = config.requireObject("objectId");
const rule1 = new opentelekomcloud.CfwBlacklistWhitelistRuleV1("rule1", {
objectId: objectId,
listType: 5,
direction: 0,
addressType: 0,
address: "1.1.1.1",
protocol: 6,
port: "1",
description: "Test111161",
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
object_id = config.require_object("objectId")
rule1 = opentelekomcloud.CfwBlacklistWhitelistRuleV1("rule1",
object_id=object_id,
list_type=5,
direction=0,
address_type=0,
address="1.1.1.1",
protocol=6,
port="1",
description="Test111161")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
objectId := cfg.RequireObject("objectId")
_, err := opentelekomcloud.NewCfwBlacklistWhitelistRuleV1(ctx, "rule1", &opentelekomcloud.CfwBlacklistWhitelistRuleV1Args{
ObjectId: pulumi.Any(objectId),
ListType: pulumi.Float64(5),
Direction: pulumi.Float64(0),
AddressType: pulumi.Float64(0),
Address: pulumi.String("1.1.1.1"),
Protocol: pulumi.Float64(6),
Port: pulumi.String("1"),
Description: pulumi.String("Test111161"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var objectId = config.RequireObject<dynamic>("objectId");
var rule1 = new Opentelekomcloud.CfwBlacklistWhitelistRuleV1("rule1", new()
{
ObjectId = objectId,
ListType = 5,
Direction = 0,
AddressType = 0,
Address = "1.1.1.1",
Protocol = 6,
Port = "1",
Description = "Test111161",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.CfwBlacklistWhitelistRuleV1;
import com.pulumi.opentelekomcloud.CfwBlacklistWhitelistRuleV1Args;
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) {
final var config = ctx.config();
final var objectId = config.get("objectId");
var rule1 = new CfwBlacklistWhitelistRuleV1("rule1", CfwBlacklistWhitelistRuleV1Args.builder()
.objectId(objectId)
.listType(5)
.direction(0)
.addressType(0)
.address("1.1.1.1")
.protocol(6)
.port("1")
.description("Test111161")
.build());
}
}
configuration:
objectId:
type: dynamic
resources:
rule1:
type: opentelekomcloud:CfwBlacklistWhitelistRuleV1
properties:
objectId: ${objectId}
listType: 5
direction: 0
addressType: 0
address: 1.1.1.1
protocol: 6
port: '1'
description: Test111161
Create CfwBlacklistWhitelistRuleV1 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CfwBlacklistWhitelistRuleV1(name: string, args: CfwBlacklistWhitelistRuleV1Args, opts?: CustomResourceOptions);
@overload
def CfwBlacklistWhitelistRuleV1(resource_name: str,
args: CfwBlacklistWhitelistRuleV1Args,
opts: Optional[ResourceOptions] = None)
@overload
def CfwBlacklistWhitelistRuleV1(resource_name: str,
opts: Optional[ResourceOptions] = None,
address: Optional[str] = None,
address_type: Optional[float] = None,
direction: Optional[float] = None,
list_type: Optional[float] = None,
object_id: Optional[str] = None,
port: Optional[str] = None,
protocol: Optional[float] = None,
description: Optional[str] = None,
timeouts: Optional[CfwBlacklistWhitelistRuleV1TimeoutsArgs] = None)
func NewCfwBlacklistWhitelistRuleV1(ctx *Context, name string, args CfwBlacklistWhitelistRuleV1Args, opts ...ResourceOption) (*CfwBlacklistWhitelistRuleV1, error)
public CfwBlacklistWhitelistRuleV1(string name, CfwBlacklistWhitelistRuleV1Args args, CustomResourceOptions? opts = null)
public CfwBlacklistWhitelistRuleV1(String name, CfwBlacklistWhitelistRuleV1Args args)
public CfwBlacklistWhitelistRuleV1(String name, CfwBlacklistWhitelistRuleV1Args args, CustomResourceOptions options)
type: opentelekomcloud:CfwBlacklistWhitelistRuleV1
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 CfwBlacklistWhitelistRuleV1Args
- 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 CfwBlacklistWhitelistRuleV1Args
- 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 CfwBlacklistWhitelistRuleV1Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CfwBlacklistWhitelistRuleV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CfwBlacklistWhitelistRuleV1Args
- 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 cfwBlacklistWhitelistRuleV1Resource = new Opentelekomcloud.CfwBlacklistWhitelistRuleV1("cfwBlacklistWhitelistRuleV1Resource", new()
{
Address = "string",
AddressType = 0,
Direction = 0,
ListType = 0,
ObjectId = "string",
Port = "string",
Protocol = 0,
Description = "string",
Timeouts = new Opentelekomcloud.Inputs.CfwBlacklistWhitelistRuleV1TimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
});
example, err := opentelekomcloud.NewCfwBlacklistWhitelistRuleV1(ctx, "cfwBlacklistWhitelistRuleV1Resource", &opentelekomcloud.CfwBlacklistWhitelistRuleV1Args{
Address: pulumi.String("string"),
AddressType: pulumi.Float64(0),
Direction: pulumi.Float64(0),
ListType: pulumi.Float64(0),
ObjectId: pulumi.String("string"),
Port: pulumi.String("string"),
Protocol: pulumi.Float64(0),
Description: pulumi.String("string"),
Timeouts: &opentelekomcloud.CfwBlacklistWhitelistRuleV1TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var cfwBlacklistWhitelistRuleV1Resource = new CfwBlacklistWhitelistRuleV1("cfwBlacklistWhitelistRuleV1Resource", CfwBlacklistWhitelistRuleV1Args.builder()
.address("string")
.addressType(0.0)
.direction(0.0)
.listType(0.0)
.objectId("string")
.port("string")
.protocol(0.0)
.description("string")
.timeouts(CfwBlacklistWhitelistRuleV1TimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.build());
cfw_blacklist_whitelist_rule_v1_resource = opentelekomcloud.CfwBlacklistWhitelistRuleV1("cfwBlacklistWhitelistRuleV1Resource",
address="string",
address_type=0,
direction=0,
list_type=0,
object_id="string",
port="string",
protocol=0,
description="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
})
const cfwBlacklistWhitelistRuleV1Resource = new opentelekomcloud.CfwBlacklistWhitelistRuleV1("cfwBlacklistWhitelistRuleV1Resource", {
address: "string",
addressType: 0,
direction: 0,
listType: 0,
objectId: "string",
port: "string",
protocol: 0,
description: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
});
type: opentelekomcloud:CfwBlacklistWhitelistRuleV1
properties:
address: string
addressType: 0
description: string
direction: 0
listType: 0
objectId: string
port: string
protocol: 0
timeouts:
create: string
delete: string
update: string
CfwBlacklistWhitelistRuleV1 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 CfwBlacklistWhitelistRuleV1 resource accepts the following input properties:
- Address string
- Specifies the IP address.
- Address
Type double - Specifies the Internet protocol type of an address:
0
(IPv4),1
(IPv6). - Direction double
- Specifies the address direction:
0
(source),1
(destination). - List
Type double - Specifies the list type.
4
(blacklist),5
(whitelist). - Object
Id string - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- Port string
- Specifies the destination port.
- Protocol double
- Specifies the Protocol type:
6
(TCP),17
(UDP),1
(ICMP),58
(ICMPv6), or -1
(any). - Description string
- Specifies the description of the blacklist or whitelist rule.
- Timeouts
Cfw
Blacklist Whitelist Rule V1Timeouts
- Address string
- Specifies the IP address.
- Address
Type float64 - Specifies the Internet protocol type of an address:
0
(IPv4),1
(IPv6). - Direction float64
- Specifies the address direction:
0
(source),1
(destination). - List
Type float64 - Specifies the list type.
4
(blacklist),5
(whitelist). - Object
Id string - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- Port string
- Specifies the destination port.
- Protocol float64
- Specifies the Protocol type:
6
(TCP),17
(UDP),1
(ICMP),58
(ICMPv6), or -1
(any). - Description string
- Specifies the description of the blacklist or whitelist rule.
- Timeouts
Cfw
Blacklist Whitelist Rule V1Timeouts Args
- address String
- Specifies the IP address.
- address
Type Double - Specifies the Internet protocol type of an address:
0
(IPv4),1
(IPv6). - direction Double
- Specifies the address direction:
0
(source),1
(destination). - list
Type Double - Specifies the list type.
4
(blacklist),5
(whitelist). - object
Id String - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- port String
- Specifies the destination port.
- protocol Double
- Specifies the Protocol type:
6
(TCP),17
(UDP),1
(ICMP),58
(ICMPv6), or -1
(any). - description String
- Specifies the description of the blacklist or whitelist rule.
- timeouts
Cfw
Blacklist Whitelist Rule V1Timeouts
- address string
- Specifies the IP address.
- address
Type number - Specifies the Internet protocol type of an address:
0
(IPv4),1
(IPv6). - direction number
- Specifies the address direction:
0
(source),1
(destination). - list
Type number - Specifies the list type.
4
(blacklist),5
(whitelist). - object
Id string - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- port string
- Specifies the destination port.
- protocol number
- Specifies the Protocol type:
6
(TCP),17
(UDP),1
(ICMP),58
(ICMPv6), or -1
(any). - description string
- Specifies the description of the blacklist or whitelist rule.
- timeouts
Cfw
Blacklist Whitelist Rule V1Timeouts
- address str
- Specifies the IP address.
- address_
type float - Specifies the Internet protocol type of an address:
0
(IPv4),1
(IPv6). - direction float
- Specifies the address direction:
0
(source),1
(destination). - list_
type float - Specifies the list type.
4
(blacklist),5
(whitelist). - object_
id str - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- port str
- Specifies the destination port.
- protocol float
- Specifies the Protocol type:
6
(TCP),17
(UDP),1
(ICMP),58
(ICMPv6), or -1
(any). - description str
- Specifies the description of the blacklist or whitelist rule.
- timeouts
Cfw
Blacklist Whitelist Rule V1Timeouts Args
- address String
- Specifies the IP address.
- address
Type Number - Specifies the Internet protocol type of an address:
0
(IPv4),1
(IPv6). - direction Number
- Specifies the address direction:
0
(source),1
(destination). - list
Type Number - Specifies the list type.
4
(blacklist),5
(whitelist). - object
Id String - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- port String
- Specifies the destination port.
- protocol Number
- Specifies the Protocol type:
6
(TCP),17
(UDP),1
(ICMP),58
(ICMPv6), or -1
(any). - description String
- Specifies the description of the blacklist or whitelist rule.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the CfwBlacklistWhitelistRuleV1 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 CfwBlacklistWhitelistRuleV1 Resource
Get an existing CfwBlacklistWhitelistRuleV1 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?: CfwBlacklistWhitelistRuleV1State, opts?: CustomResourceOptions): CfwBlacklistWhitelistRuleV1
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
address: Optional[str] = None,
address_type: Optional[float] = None,
description: Optional[str] = None,
direction: Optional[float] = None,
list_type: Optional[float] = None,
object_id: Optional[str] = None,
port: Optional[str] = None,
protocol: Optional[float] = None,
timeouts: Optional[CfwBlacklistWhitelistRuleV1TimeoutsArgs] = None) -> CfwBlacklistWhitelistRuleV1
func GetCfwBlacklistWhitelistRuleV1(ctx *Context, name string, id IDInput, state *CfwBlacklistWhitelistRuleV1State, opts ...ResourceOption) (*CfwBlacklistWhitelistRuleV1, error)
public static CfwBlacklistWhitelistRuleV1 Get(string name, Input<string> id, CfwBlacklistWhitelistRuleV1State? state, CustomResourceOptions? opts = null)
public static CfwBlacklistWhitelistRuleV1 get(String name, Output<String> id, CfwBlacklistWhitelistRuleV1State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:CfwBlacklistWhitelistRuleV1 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.
- Address string
- Specifies the IP address.
- Address
Type double - Specifies the Internet protocol type of an address:
0
(IPv4),1
(IPv6). - Description string
- Specifies the description of the blacklist or whitelist rule.
- Direction double
- Specifies the address direction:
0
(source),1
(destination). - List
Type double - Specifies the list type.
4
(blacklist),5
(whitelist). - Object
Id string - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- Port string
- Specifies the destination port.
- Protocol double
- Specifies the Protocol type:
6
(TCP),17
(UDP),1
(ICMP),58
(ICMPv6), or -1
(any). - Timeouts
Cfw
Blacklist Whitelist Rule V1Timeouts
- Address string
- Specifies the IP address.
- Address
Type float64 - Specifies the Internet protocol type of an address:
0
(IPv4),1
(IPv6). - Description string
- Specifies the description of the blacklist or whitelist rule.
- Direction float64
- Specifies the address direction:
0
(source),1
(destination). - List
Type float64 - Specifies the list type.
4
(blacklist),5
(whitelist). - Object
Id string - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- Port string
- Specifies the destination port.
- Protocol float64
- Specifies the Protocol type:
6
(TCP),17
(UDP),1
(ICMP),58
(ICMPv6), or -1
(any). - Timeouts
Cfw
Blacklist Whitelist Rule V1Timeouts Args
- address String
- Specifies the IP address.
- address
Type Double - Specifies the Internet protocol type of an address:
0
(IPv4),1
(IPv6). - description String
- Specifies the description of the blacklist or whitelist rule.
- direction Double
- Specifies the address direction:
0
(source),1
(destination). - list
Type Double - Specifies the list type.
4
(blacklist),5
(whitelist). - object
Id String - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- port String
- Specifies the destination port.
- protocol Double
- Specifies the Protocol type:
6
(TCP),17
(UDP),1
(ICMP),58
(ICMPv6), or -1
(any). - timeouts
Cfw
Blacklist Whitelist Rule V1Timeouts
- address string
- Specifies the IP address.
- address
Type number - Specifies the Internet protocol type of an address:
0
(IPv4),1
(IPv6). - description string
- Specifies the description of the blacklist or whitelist rule.
- direction number
- Specifies the address direction:
0
(source),1
(destination). - list
Type number - Specifies the list type.
4
(blacklist),5
(whitelist). - object
Id string - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- port string
- Specifies the destination port.
- protocol number
- Specifies the Protocol type:
6
(TCP),17
(UDP),1
(ICMP),58
(ICMPv6), or -1
(any). - timeouts
Cfw
Blacklist Whitelist Rule V1Timeouts
- address str
- Specifies the IP address.
- address_
type float - Specifies the Internet protocol type of an address:
0
(IPv4),1
(IPv6). - description str
- Specifies the description of the blacklist or whitelist rule.
- direction float
- Specifies the address direction:
0
(source),1
(destination). - list_
type float - Specifies the list type.
4
(blacklist),5
(whitelist). - object_
id str - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- port str
- Specifies the destination port.
- protocol float
- Specifies the Protocol type:
6
(TCP),17
(UDP),1
(ICMP),58
(ICMPv6), or -1
(any). - timeouts
Cfw
Blacklist Whitelist Rule V1Timeouts Args
- address String
- Specifies the IP address.
- address
Type Number - Specifies the Internet protocol type of an address:
0
(IPv4),1
(IPv6). - description String
- Specifies the description of the blacklist or whitelist rule.
- direction Number
- Specifies the address direction:
0
(source),1
(destination). - list
Type Number - Specifies the list type.
4
(blacklist),5
(whitelist). - object
Id String - Specifies the protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border.
- port String
- Specifies the destination port.
- protocol Number
- Specifies the Protocol type:
6
(TCP),17
(UDP),1
(ICMP),58
(ICMPv6), or -1
(any). - timeouts Property Map
Supporting Types
CfwBlacklistWhitelistRuleV1Timeouts, CfwBlacklistWhitelistRuleV1TimeoutsArgs
Import
CFW Blacklist or Whitelist Rule V1 resource can be imported using the object ID, object_id
, the type of list, list_type
and IP address, address
, e.g.
$ pulumi import opentelekomcloud:index/cfwBlacklistWhitelistRuleV1:CfwBlacklistWhitelistRuleV1 rule_1 <object_id>/<list_type>/<address>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.