alicloud.cloudfirewall.ControlPolicy
Explore with Pulumi AI
Provides a Cloud Firewall Control Policy resource.
For information about Cloud Firewall Control Policy and how to use it, see What is Control Policy.
NOTE: Available since v1.129.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new alicloud.cloudfirewall.ControlPolicy("default", {
direction: "in",
applicationName: "ANY",
description: name,
aclAction: "accept",
source: "127.0.0.1/32",
sourceType: "net",
destination: "127.0.0.2/32",
destinationType: "net",
proto: "ANY",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.cloudfirewall.ControlPolicy("default",
direction="in",
application_name="ANY",
description=name,
acl_action="accept",
source="127.0.0.1/32",
source_type="net",
destination="127.0.0.2/32",
destination_type="net",
proto="ANY")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cloudfirewall"
"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, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := cloudfirewall.NewControlPolicy(ctx, "default", &cloudfirewall.ControlPolicyArgs{
Direction: pulumi.String("in"),
ApplicationName: pulumi.String("ANY"),
Description: pulumi.String(name),
AclAction: pulumi.String("accept"),
Source: pulumi.String("127.0.0.1/32"),
SourceType: pulumi.String("net"),
Destination: pulumi.String("127.0.0.2/32"),
DestinationType: pulumi.String("net"),
Proto: pulumi.String("ANY"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = new AliCloud.CloudFirewall.ControlPolicy("default", new()
{
Direction = "in",
ApplicationName = "ANY",
Description = name,
AclAction = "accept",
Source = "127.0.0.1/32",
SourceType = "net",
Destination = "127.0.0.2/32",
DestinationType = "net",
Proto = "ANY",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cloudfirewall.ControlPolicy;
import com.pulumi.alicloud.cloudfirewall.ControlPolicyArgs;
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 name = config.get("name").orElse("terraform-example");
var default_ = new ControlPolicy("default", ControlPolicyArgs.builder()
.direction("in")
.applicationName("ANY")
.description(name)
.aclAction("accept")
.source("127.0.0.1/32")
.sourceType("net")
.destination("127.0.0.2/32")
.destinationType("net")
.proto("ANY")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: alicloud:cloudfirewall:ControlPolicy
properties:
direction: in
applicationName: ANY
description: ${name}
aclAction: accept
source: 127.0.0.1/32
sourceType: net
destination: 127.0.0.2/32
destinationType: net
proto: ANY
Create ControlPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ControlPolicy(name: string, args: ControlPolicyArgs, opts?: CustomResourceOptions);
@overload
def ControlPolicy(resource_name: str,
args: ControlPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ControlPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
destination_type: Optional[str] = None,
source_type: Optional[str] = None,
source: Optional[str] = None,
description: Optional[str] = None,
proto: Optional[str] = None,
acl_action: Optional[str] = None,
direction: Optional[str] = None,
destination: Optional[str] = None,
ip_version: Optional[str] = None,
release: Optional[str] = None,
domain_resolve_type: Optional[str] = None,
end_time: Optional[int] = None,
dest_port_group: Optional[str] = None,
lang: Optional[str] = None,
dest_port: Optional[str] = None,
dest_port_type: Optional[str] = None,
repeat_days: Optional[Sequence[int]] = None,
repeat_end_time: Optional[str] = None,
repeat_start_time: Optional[str] = None,
repeat_type: Optional[str] = None,
application_name_lists: Optional[Sequence[str]] = None,
source_ip: Optional[str] = None,
application_name: Optional[str] = None,
start_time: Optional[int] = None)
func NewControlPolicy(ctx *Context, name string, args ControlPolicyArgs, opts ...ResourceOption) (*ControlPolicy, error)
public ControlPolicy(string name, ControlPolicyArgs args, CustomResourceOptions? opts = null)
public ControlPolicy(String name, ControlPolicyArgs args)
public ControlPolicy(String name, ControlPolicyArgs args, CustomResourceOptions options)
type: alicloud:cloudfirewall:ControlPolicy
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 ControlPolicyArgs
- 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 ControlPolicyArgs
- 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 ControlPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ControlPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ControlPolicyArgs
- 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 controlPolicyResource = new AliCloud.CloudFirewall.ControlPolicy("controlPolicyResource", new()
{
DestinationType = "string",
SourceType = "string",
Source = "string",
Description = "string",
Proto = "string",
AclAction = "string",
Direction = "string",
Destination = "string",
IpVersion = "string",
Release = "string",
DomainResolveType = "string",
EndTime = 0,
DestPortGroup = "string",
Lang = "string",
DestPort = "string",
DestPortType = "string",
RepeatDays = new[]
{
0,
},
RepeatEndTime = "string",
RepeatStartTime = "string",
RepeatType = "string",
ApplicationNameLists = new[]
{
"string",
},
SourceIp = "string",
ApplicationName = "string",
StartTime = 0,
});
example, err := cloudfirewall.NewControlPolicy(ctx, "controlPolicyResource", &cloudfirewall.ControlPolicyArgs{
DestinationType: pulumi.String("string"),
SourceType: pulumi.String("string"),
Source: pulumi.String("string"),
Description: pulumi.String("string"),
Proto: pulumi.String("string"),
AclAction: pulumi.String("string"),
Direction: pulumi.String("string"),
Destination: pulumi.String("string"),
IpVersion: pulumi.String("string"),
Release: pulumi.String("string"),
DomainResolveType: pulumi.String("string"),
EndTime: pulumi.Int(0),
DestPortGroup: pulumi.String("string"),
Lang: pulumi.String("string"),
DestPort: pulumi.String("string"),
DestPortType: pulumi.String("string"),
RepeatDays: pulumi.IntArray{
pulumi.Int(0),
},
RepeatEndTime: pulumi.String("string"),
RepeatStartTime: pulumi.String("string"),
RepeatType: pulumi.String("string"),
ApplicationNameLists: pulumi.StringArray{
pulumi.String("string"),
},
SourceIp: pulumi.String("string"),
ApplicationName: pulumi.String("string"),
StartTime: pulumi.Int(0),
})
var controlPolicyResource = new ControlPolicy("controlPolicyResource", ControlPolicyArgs.builder()
.destinationType("string")
.sourceType("string")
.source("string")
.description("string")
.proto("string")
.aclAction("string")
.direction("string")
.destination("string")
.ipVersion("string")
.release("string")
.domainResolveType("string")
.endTime(0)
.destPortGroup("string")
.lang("string")
.destPort("string")
.destPortType("string")
.repeatDays(0)
.repeatEndTime("string")
.repeatStartTime("string")
.repeatType("string")
.applicationNameLists("string")
.sourceIp("string")
.applicationName("string")
.startTime(0)
.build());
control_policy_resource = alicloud.cloudfirewall.ControlPolicy("controlPolicyResource",
destination_type="string",
source_type="string",
source="string",
description="string",
proto="string",
acl_action="string",
direction="string",
destination="string",
ip_version="string",
release="string",
domain_resolve_type="string",
end_time=0,
dest_port_group="string",
lang="string",
dest_port="string",
dest_port_type="string",
repeat_days=[0],
repeat_end_time="string",
repeat_start_time="string",
repeat_type="string",
application_name_lists=["string"],
source_ip="string",
application_name="string",
start_time=0)
const controlPolicyResource = new alicloud.cloudfirewall.ControlPolicy("controlPolicyResource", {
destinationType: "string",
sourceType: "string",
source: "string",
description: "string",
proto: "string",
aclAction: "string",
direction: "string",
destination: "string",
ipVersion: "string",
release: "string",
domainResolveType: "string",
endTime: 0,
destPortGroup: "string",
lang: "string",
destPort: "string",
destPortType: "string",
repeatDays: [0],
repeatEndTime: "string",
repeatStartTime: "string",
repeatType: "string",
applicationNameLists: ["string"],
sourceIp: "string",
applicationName: "string",
startTime: 0,
});
type: alicloud:cloudfirewall:ControlPolicy
properties:
aclAction: string
applicationName: string
applicationNameLists:
- string
description: string
destPort: string
destPortGroup: string
destPortType: string
destination: string
destinationType: string
direction: string
domainResolveType: string
endTime: 0
ipVersion: string
lang: string
proto: string
release: string
repeatDays:
- 0
repeatEndTime: string
repeatStartTime: string
repeatType: string
source: string
sourceIp: string
sourceType: string
startTime: 0
ControlPolicy 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 ControlPolicy resource accepts the following input properties:
- Acl
Action string - The action that Cloud Firewall performs on the traffic. Valid values:
accept
,drop
,log
. - Description string
- The description of the access control policy.
- Destination string
- The destination address in the access control policy.
- Destination
Type string - The type of the destination address in the access control policy. Valid values:
net
,group
,domain
,location
. - Direction string
- The direction of the traffic to which the access control policy applies. Valid values:
in
,out
. - Proto string
- The protocol type supported by the access control policy. Valid values:
ANY
,TCP
,UDP
,ICMP
. - Source string
- The source address in the access control policy.
- Source
Type string - The type of the source address in the access control policy. Valid values:
net
,group
,location
. - Application
Name string The application type supported by the access control policy. Valid values:
ANY
,HTTP
,HTTPS
,MQTT
,Memcache
,MongoDB
,MySQL
,RDP
,Redis
,SMTP
,SMTPS
,SSH
,SSL
,VNC
.NOTE: If
proto
is set toTCP
, you can setapplication_name
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name
toANY
.- Application
Name List<string>Lists The application types supported by the access control policy.
NOTE: If
proto
is set toTCP
, you can setapplication_name_list
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name_list
to["ANY"]
. From version 1.232.0, You must specify at least one of theapplication_name_list
andapplication_name
. If you specify bothapplication_name_list
andapplication_name
, only theapplication_name_list
takes effect.- Dest
Port string - The destination port in the access control policy. Note: If
dest_port_type
is set toport
, you must specifydest_port
. - Dest
Port stringGroup - The name of the destination port address book in the access control policy. Note: If
dest_port_type
is set togroup
, you must specifydest_port_group
. - Dest
Port stringType - The type of the destination port in the access control policy. Valid values:
port
,group
. - Domain
Resolve stringType - The domain name resolution method of the access control policy. Valid values:
FQDN
: Fully qualified domain name (FQDN)-based resolution.DNS
: DNS-based dynamic resolution.FQDN_AND_DNS
: FQDN and DNS-based dynamic resolution.
- End
Time int The time when the access control policy stops taking effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes later than the start time.
NOTE: If
repeat_type
is set toNone
,Daily
,Weekly
, orMonthly
,start_time
andend_time
must be set.- Ip
Version string - The IP version supported by the access control policy. Default value:
4
. Valid values: - Lang string
- The language of the content within the request and response. Valid values:
zh
,en
. - Release string
- The status of the access control policy. Valid values:
true
,false
. - Repeat
Days List<int> The days of a week or of a month on which the access control policy takes effect. Valid values:
- If
repeat_type
is set toWeekly
. Valid values:0
to6
. - If
repeat_type
is set toMonthly
. Valid values:1
to31
.
NOTE: If
repeat_type
is set toWeekly
, orMonthly
,repeat_days
must be set.- If
- Repeat
End stringTime The point in time when the recurrence ends. Example:
23:30
. The end time must be on the hour or on the half hour, and at least 30 minutes later than the start time.NOTE: If
repeat_type
is set toDaily
,Weekly
, orMonthly
,repeat_start_time
andrepeat_end_time
must be set.- Repeat
Start stringTime - The point in time when the recurrence starts. Example:
08:00
. The start time must be on the hour or on the half hour, and at least 30 minutes earlier than the end time. - Repeat
Type string - The recurrence type for the access control policy to take effect. Default value:
Permanent
. Valid values:Permanent
: The policy always takes effect.None
: The policy takes effect for only once.Daily
: The policy takes effect on a daily basis.Weekly
: The policy takes effect on a weekly basis.Monthly
: The policy takes effect on a monthly basis.
- Source
Ip string - The source IP address of the request.
- Start
Time int - The time when the access control policy starts to take effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes earlier than the end time.
- Acl
Action string - The action that Cloud Firewall performs on the traffic. Valid values:
accept
,drop
,log
. - Description string
- The description of the access control policy.
- Destination string
- The destination address in the access control policy.
- Destination
Type string - The type of the destination address in the access control policy. Valid values:
net
,group
,domain
,location
. - Direction string
- The direction of the traffic to which the access control policy applies. Valid values:
in
,out
. - Proto string
- The protocol type supported by the access control policy. Valid values:
ANY
,TCP
,UDP
,ICMP
. - Source string
- The source address in the access control policy.
- Source
Type string - The type of the source address in the access control policy. Valid values:
net
,group
,location
. - Application
Name string The application type supported by the access control policy. Valid values:
ANY
,HTTP
,HTTPS
,MQTT
,Memcache
,MongoDB
,MySQL
,RDP
,Redis
,SMTP
,SMTPS
,SSH
,SSL
,VNC
.NOTE: If
proto
is set toTCP
, you can setapplication_name
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name
toANY
.- Application
Name []stringLists The application types supported by the access control policy.
NOTE: If
proto
is set toTCP
, you can setapplication_name_list
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name_list
to["ANY"]
. From version 1.232.0, You must specify at least one of theapplication_name_list
andapplication_name
. If you specify bothapplication_name_list
andapplication_name
, only theapplication_name_list
takes effect.- Dest
Port string - The destination port in the access control policy. Note: If
dest_port_type
is set toport
, you must specifydest_port
. - Dest
Port stringGroup - The name of the destination port address book in the access control policy. Note: If
dest_port_type
is set togroup
, you must specifydest_port_group
. - Dest
Port stringType - The type of the destination port in the access control policy. Valid values:
port
,group
. - Domain
Resolve stringType - The domain name resolution method of the access control policy. Valid values:
FQDN
: Fully qualified domain name (FQDN)-based resolution.DNS
: DNS-based dynamic resolution.FQDN_AND_DNS
: FQDN and DNS-based dynamic resolution.
- End
Time int The time when the access control policy stops taking effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes later than the start time.
NOTE: If
repeat_type
is set toNone
,Daily
,Weekly
, orMonthly
,start_time
andend_time
must be set.- Ip
Version string - The IP version supported by the access control policy. Default value:
4
. Valid values: - Lang string
- The language of the content within the request and response. Valid values:
zh
,en
. - Release string
- The status of the access control policy. Valid values:
true
,false
. - Repeat
Days []int The days of a week or of a month on which the access control policy takes effect. Valid values:
- If
repeat_type
is set toWeekly
. Valid values:0
to6
. - If
repeat_type
is set toMonthly
. Valid values:1
to31
.
NOTE: If
repeat_type
is set toWeekly
, orMonthly
,repeat_days
must be set.- If
- Repeat
End stringTime The point in time when the recurrence ends. Example:
23:30
. The end time must be on the hour or on the half hour, and at least 30 minutes later than the start time.NOTE: If
repeat_type
is set toDaily
,Weekly
, orMonthly
,repeat_start_time
andrepeat_end_time
must be set.- Repeat
Start stringTime - The point in time when the recurrence starts. Example:
08:00
. The start time must be on the hour or on the half hour, and at least 30 minutes earlier than the end time. - Repeat
Type string - The recurrence type for the access control policy to take effect. Default value:
Permanent
. Valid values:Permanent
: The policy always takes effect.None
: The policy takes effect for only once.Daily
: The policy takes effect on a daily basis.Weekly
: The policy takes effect on a weekly basis.Monthly
: The policy takes effect on a monthly basis.
- Source
Ip string - The source IP address of the request.
- Start
Time int - The time when the access control policy starts to take effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes earlier than the end time.
- acl
Action String - The action that Cloud Firewall performs on the traffic. Valid values:
accept
,drop
,log
. - description String
- The description of the access control policy.
- destination String
- The destination address in the access control policy.
- destination
Type String - The type of the destination address in the access control policy. Valid values:
net
,group
,domain
,location
. - direction String
- The direction of the traffic to which the access control policy applies. Valid values:
in
,out
. - proto String
- The protocol type supported by the access control policy. Valid values:
ANY
,TCP
,UDP
,ICMP
. - source String
- The source address in the access control policy.
- source
Type String - The type of the source address in the access control policy. Valid values:
net
,group
,location
. - application
Name String The application type supported by the access control policy. Valid values:
ANY
,HTTP
,HTTPS
,MQTT
,Memcache
,MongoDB
,MySQL
,RDP
,Redis
,SMTP
,SMTPS
,SSH
,SSL
,VNC
.NOTE: If
proto
is set toTCP
, you can setapplication_name
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name
toANY
.- application
Name List<String>Lists The application types supported by the access control policy.
NOTE: If
proto
is set toTCP
, you can setapplication_name_list
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name_list
to["ANY"]
. From version 1.232.0, You must specify at least one of theapplication_name_list
andapplication_name
. If you specify bothapplication_name_list
andapplication_name
, only theapplication_name_list
takes effect.- dest
Port String - The destination port in the access control policy. Note: If
dest_port_type
is set toport
, you must specifydest_port
. - dest
Port StringGroup - The name of the destination port address book in the access control policy. Note: If
dest_port_type
is set togroup
, you must specifydest_port_group
. - dest
Port StringType - The type of the destination port in the access control policy. Valid values:
port
,group
. - domain
Resolve StringType - The domain name resolution method of the access control policy. Valid values:
FQDN
: Fully qualified domain name (FQDN)-based resolution.DNS
: DNS-based dynamic resolution.FQDN_AND_DNS
: FQDN and DNS-based dynamic resolution.
- end
Time Integer The time when the access control policy stops taking effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes later than the start time.
NOTE: If
repeat_type
is set toNone
,Daily
,Weekly
, orMonthly
,start_time
andend_time
must be set.- ip
Version String - The IP version supported by the access control policy. Default value:
4
. Valid values: - lang String
- The language of the content within the request and response. Valid values:
zh
,en
. - release String
- The status of the access control policy. Valid values:
true
,false
. - repeat
Days List<Integer> The days of a week or of a month on which the access control policy takes effect. Valid values:
- If
repeat_type
is set toWeekly
. Valid values:0
to6
. - If
repeat_type
is set toMonthly
. Valid values:1
to31
.
NOTE: If
repeat_type
is set toWeekly
, orMonthly
,repeat_days
must be set.- If
- repeat
End StringTime The point in time when the recurrence ends. Example:
23:30
. The end time must be on the hour or on the half hour, and at least 30 minutes later than the start time.NOTE: If
repeat_type
is set toDaily
,Weekly
, orMonthly
,repeat_start_time
andrepeat_end_time
must be set.- repeat
Start StringTime - The point in time when the recurrence starts. Example:
08:00
. The start time must be on the hour or on the half hour, and at least 30 minutes earlier than the end time. - repeat
Type String - The recurrence type for the access control policy to take effect. Default value:
Permanent
. Valid values:Permanent
: The policy always takes effect.None
: The policy takes effect for only once.Daily
: The policy takes effect on a daily basis.Weekly
: The policy takes effect on a weekly basis.Monthly
: The policy takes effect on a monthly basis.
- source
Ip String - The source IP address of the request.
- start
Time Integer - The time when the access control policy starts to take effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes earlier than the end time.
- acl
Action string - The action that Cloud Firewall performs on the traffic. Valid values:
accept
,drop
,log
. - description string
- The description of the access control policy.
- destination string
- The destination address in the access control policy.
- destination
Type string - The type of the destination address in the access control policy. Valid values:
net
,group
,domain
,location
. - direction string
- The direction of the traffic to which the access control policy applies. Valid values:
in
,out
. - proto string
- The protocol type supported by the access control policy. Valid values:
ANY
,TCP
,UDP
,ICMP
. - source string
- The source address in the access control policy.
- source
Type string - The type of the source address in the access control policy. Valid values:
net
,group
,location
. - application
Name string The application type supported by the access control policy. Valid values:
ANY
,HTTP
,HTTPS
,MQTT
,Memcache
,MongoDB
,MySQL
,RDP
,Redis
,SMTP
,SMTPS
,SSH
,SSL
,VNC
.NOTE: If
proto
is set toTCP
, you can setapplication_name
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name
toANY
.- application
Name string[]Lists The application types supported by the access control policy.
NOTE: If
proto
is set toTCP
, you can setapplication_name_list
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name_list
to["ANY"]
. From version 1.232.0, You must specify at least one of theapplication_name_list
andapplication_name
. If you specify bothapplication_name_list
andapplication_name
, only theapplication_name_list
takes effect.- dest
Port string - The destination port in the access control policy. Note: If
dest_port_type
is set toport
, you must specifydest_port
. - dest
Port stringGroup - The name of the destination port address book in the access control policy. Note: If
dest_port_type
is set togroup
, you must specifydest_port_group
. - dest
Port stringType - The type of the destination port in the access control policy. Valid values:
port
,group
. - domain
Resolve stringType - The domain name resolution method of the access control policy. Valid values:
FQDN
: Fully qualified domain name (FQDN)-based resolution.DNS
: DNS-based dynamic resolution.FQDN_AND_DNS
: FQDN and DNS-based dynamic resolution.
- end
Time number The time when the access control policy stops taking effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes later than the start time.
NOTE: If
repeat_type
is set toNone
,Daily
,Weekly
, orMonthly
,start_time
andend_time
must be set.- ip
Version string - The IP version supported by the access control policy. Default value:
4
. Valid values: - lang string
- The language of the content within the request and response. Valid values:
zh
,en
. - release string
- The status of the access control policy. Valid values:
true
,false
. - repeat
Days number[] The days of a week or of a month on which the access control policy takes effect. Valid values:
- If
repeat_type
is set toWeekly
. Valid values:0
to6
. - If
repeat_type
is set toMonthly
. Valid values:1
to31
.
NOTE: If
repeat_type
is set toWeekly
, orMonthly
,repeat_days
must be set.- If
- repeat
End stringTime The point in time when the recurrence ends. Example:
23:30
. The end time must be on the hour or on the half hour, and at least 30 minutes later than the start time.NOTE: If
repeat_type
is set toDaily
,Weekly
, orMonthly
,repeat_start_time
andrepeat_end_time
must be set.- repeat
Start stringTime - The point in time when the recurrence starts. Example:
08:00
. The start time must be on the hour or on the half hour, and at least 30 minutes earlier than the end time. - repeat
Type string - The recurrence type for the access control policy to take effect. Default value:
Permanent
. Valid values:Permanent
: The policy always takes effect.None
: The policy takes effect for only once.Daily
: The policy takes effect on a daily basis.Weekly
: The policy takes effect on a weekly basis.Monthly
: The policy takes effect on a monthly basis.
- source
Ip string - The source IP address of the request.
- start
Time number - The time when the access control policy starts to take effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes earlier than the end time.
- acl_
action str - The action that Cloud Firewall performs on the traffic. Valid values:
accept
,drop
,log
. - description str
- The description of the access control policy.
- destination str
- The destination address in the access control policy.
- destination_
type str - The type of the destination address in the access control policy. Valid values:
net
,group
,domain
,location
. - direction str
- The direction of the traffic to which the access control policy applies. Valid values:
in
,out
. - proto str
- The protocol type supported by the access control policy. Valid values:
ANY
,TCP
,UDP
,ICMP
. - source str
- The source address in the access control policy.
- source_
type str - The type of the source address in the access control policy. Valid values:
net
,group
,location
. - application_
name str The application type supported by the access control policy. Valid values:
ANY
,HTTP
,HTTPS
,MQTT
,Memcache
,MongoDB
,MySQL
,RDP
,Redis
,SMTP
,SMTPS
,SSH
,SSL
,VNC
.NOTE: If
proto
is set toTCP
, you can setapplication_name
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name
toANY
.- application_
name_ Sequence[str]lists The application types supported by the access control policy.
NOTE: If
proto
is set toTCP
, you can setapplication_name_list
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name_list
to["ANY"]
. From version 1.232.0, You must specify at least one of theapplication_name_list
andapplication_name
. If you specify bothapplication_name_list
andapplication_name
, only theapplication_name_list
takes effect.- dest_
port str - The destination port in the access control policy. Note: If
dest_port_type
is set toport
, you must specifydest_port
. - dest_
port_ strgroup - The name of the destination port address book in the access control policy. Note: If
dest_port_type
is set togroup
, you must specifydest_port_group
. - dest_
port_ strtype - The type of the destination port in the access control policy. Valid values:
port
,group
. - domain_
resolve_ strtype - The domain name resolution method of the access control policy. Valid values:
FQDN
: Fully qualified domain name (FQDN)-based resolution.DNS
: DNS-based dynamic resolution.FQDN_AND_DNS
: FQDN and DNS-based dynamic resolution.
- end_
time int The time when the access control policy stops taking effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes later than the start time.
NOTE: If
repeat_type
is set toNone
,Daily
,Weekly
, orMonthly
,start_time
andend_time
must be set.- ip_
version str - The IP version supported by the access control policy. Default value:
4
. Valid values: - lang str
- The language of the content within the request and response. Valid values:
zh
,en
. - release str
- The status of the access control policy. Valid values:
true
,false
. - repeat_
days Sequence[int] The days of a week or of a month on which the access control policy takes effect. Valid values:
- If
repeat_type
is set toWeekly
. Valid values:0
to6
. - If
repeat_type
is set toMonthly
. Valid values:1
to31
.
NOTE: If
repeat_type
is set toWeekly
, orMonthly
,repeat_days
must be set.- If
- repeat_
end_ strtime The point in time when the recurrence ends. Example:
23:30
. The end time must be on the hour or on the half hour, and at least 30 minutes later than the start time.NOTE: If
repeat_type
is set toDaily
,Weekly
, orMonthly
,repeat_start_time
andrepeat_end_time
must be set.- repeat_
start_ strtime - The point in time when the recurrence starts. Example:
08:00
. The start time must be on the hour or on the half hour, and at least 30 minutes earlier than the end time. - repeat_
type str - The recurrence type for the access control policy to take effect. Default value:
Permanent
. Valid values:Permanent
: The policy always takes effect.None
: The policy takes effect for only once.Daily
: The policy takes effect on a daily basis.Weekly
: The policy takes effect on a weekly basis.Monthly
: The policy takes effect on a monthly basis.
- source_
ip str - The source IP address of the request.
- start_
time int - The time when the access control policy starts to take effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes earlier than the end time.
- acl
Action String - The action that Cloud Firewall performs on the traffic. Valid values:
accept
,drop
,log
. - description String
- The description of the access control policy.
- destination String
- The destination address in the access control policy.
- destination
Type String - The type of the destination address in the access control policy. Valid values:
net
,group
,domain
,location
. - direction String
- The direction of the traffic to which the access control policy applies. Valid values:
in
,out
. - proto String
- The protocol type supported by the access control policy. Valid values:
ANY
,TCP
,UDP
,ICMP
. - source String
- The source address in the access control policy.
- source
Type String - The type of the source address in the access control policy. Valid values:
net
,group
,location
. - application
Name String The application type supported by the access control policy. Valid values:
ANY
,HTTP
,HTTPS
,MQTT
,Memcache
,MongoDB
,MySQL
,RDP
,Redis
,SMTP
,SMTPS
,SSH
,SSL
,VNC
.NOTE: If
proto
is set toTCP
, you can setapplication_name
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name
toANY
.- application
Name List<String>Lists The application types supported by the access control policy.
NOTE: If
proto
is set toTCP
, you can setapplication_name_list
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name_list
to["ANY"]
. From version 1.232.0, You must specify at least one of theapplication_name_list
andapplication_name
. If you specify bothapplication_name_list
andapplication_name
, only theapplication_name_list
takes effect.- dest
Port String - The destination port in the access control policy. Note: If
dest_port_type
is set toport
, you must specifydest_port
. - dest
Port StringGroup - The name of the destination port address book in the access control policy. Note: If
dest_port_type
is set togroup
, you must specifydest_port_group
. - dest
Port StringType - The type of the destination port in the access control policy. Valid values:
port
,group
. - domain
Resolve StringType - The domain name resolution method of the access control policy. Valid values:
FQDN
: Fully qualified domain name (FQDN)-based resolution.DNS
: DNS-based dynamic resolution.FQDN_AND_DNS
: FQDN and DNS-based dynamic resolution.
- end
Time Number The time when the access control policy stops taking effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes later than the start time.
NOTE: If
repeat_type
is set toNone
,Daily
,Weekly
, orMonthly
,start_time
andend_time
must be set.- ip
Version String - The IP version supported by the access control policy. Default value:
4
. Valid values: - lang String
- The language of the content within the request and response. Valid values:
zh
,en
. - release String
- The status of the access control policy. Valid values:
true
,false
. - repeat
Days List<Number> The days of a week or of a month on which the access control policy takes effect. Valid values:
- If
repeat_type
is set toWeekly
. Valid values:0
to6
. - If
repeat_type
is set toMonthly
. Valid values:1
to31
.
NOTE: If
repeat_type
is set toWeekly
, orMonthly
,repeat_days
must be set.- If
- repeat
End StringTime The point in time when the recurrence ends. Example:
23:30
. The end time must be on the hour or on the half hour, and at least 30 minutes later than the start time.NOTE: If
repeat_type
is set toDaily
,Weekly
, orMonthly
,repeat_start_time
andrepeat_end_time
must be set.- repeat
Start StringTime - The point in time when the recurrence starts. Example:
08:00
. The start time must be on the hour or on the half hour, and at least 30 minutes earlier than the end time. - repeat
Type String - The recurrence type for the access control policy to take effect. Default value:
Permanent
. Valid values:Permanent
: The policy always takes effect.None
: The policy takes effect for only once.Daily
: The policy takes effect on a daily basis.Weekly
: The policy takes effect on a weekly basis.Monthly
: The policy takes effect on a monthly basis.
- source
Ip String - The source IP address of the request.
- start
Time Number - The time when the access control policy starts to take effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes earlier than the end time.
Outputs
All input properties are implicitly available as output properties. Additionally, the ControlPolicy resource produces the following output properties:
- Acl
Uuid string - (Available since v1.148.0) The unique ID of the access control policy.
- Create
Time string - (Available since v1.232.0) The time when the access control policy was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Acl
Uuid string - (Available since v1.148.0) The unique ID of the access control policy.
- Create
Time string - (Available since v1.232.0) The time when the access control policy was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- acl
Uuid String - (Available since v1.148.0) The unique ID of the access control policy.
- create
Time String - (Available since v1.232.0) The time when the access control policy was created.
- id String
- The provider-assigned unique ID for this managed resource.
- acl
Uuid string - (Available since v1.148.0) The unique ID of the access control policy.
- create
Time string - (Available since v1.232.0) The time when the access control policy was created.
- id string
- The provider-assigned unique ID for this managed resource.
- acl_
uuid str - (Available since v1.148.0) The unique ID of the access control policy.
- create_
time str - (Available since v1.232.0) The time when the access control policy was created.
- id str
- The provider-assigned unique ID for this managed resource.
- acl
Uuid String - (Available since v1.148.0) The unique ID of the access control policy.
- create
Time String - (Available since v1.232.0) The time when the access control policy was created.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ControlPolicy Resource
Get an existing ControlPolicy 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?: ControlPolicyState, opts?: CustomResourceOptions): ControlPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
acl_action: Optional[str] = None,
acl_uuid: Optional[str] = None,
application_name: Optional[str] = None,
application_name_lists: Optional[Sequence[str]] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
dest_port: Optional[str] = None,
dest_port_group: Optional[str] = None,
dest_port_type: Optional[str] = None,
destination: Optional[str] = None,
destination_type: Optional[str] = None,
direction: Optional[str] = None,
domain_resolve_type: Optional[str] = None,
end_time: Optional[int] = None,
ip_version: Optional[str] = None,
lang: Optional[str] = None,
proto: Optional[str] = None,
release: Optional[str] = None,
repeat_days: Optional[Sequence[int]] = None,
repeat_end_time: Optional[str] = None,
repeat_start_time: Optional[str] = None,
repeat_type: Optional[str] = None,
source: Optional[str] = None,
source_ip: Optional[str] = None,
source_type: Optional[str] = None,
start_time: Optional[int] = None) -> ControlPolicy
func GetControlPolicy(ctx *Context, name string, id IDInput, state *ControlPolicyState, opts ...ResourceOption) (*ControlPolicy, error)
public static ControlPolicy Get(string name, Input<string> id, ControlPolicyState? state, CustomResourceOptions? opts = null)
public static ControlPolicy get(String name, Output<String> id, ControlPolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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
Action string - The action that Cloud Firewall performs on the traffic. Valid values:
accept
,drop
,log
. - Acl
Uuid string - (Available since v1.148.0) The unique ID of the access control policy.
- Application
Name string The application type supported by the access control policy. Valid values:
ANY
,HTTP
,HTTPS
,MQTT
,Memcache
,MongoDB
,MySQL
,RDP
,Redis
,SMTP
,SMTPS
,SSH
,SSL
,VNC
.NOTE: If
proto
is set toTCP
, you can setapplication_name
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name
toANY
.- Application
Name List<string>Lists The application types supported by the access control policy.
NOTE: If
proto
is set toTCP
, you can setapplication_name_list
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name_list
to["ANY"]
. From version 1.232.0, You must specify at least one of theapplication_name_list
andapplication_name
. If you specify bothapplication_name_list
andapplication_name
, only theapplication_name_list
takes effect.- Create
Time string - (Available since v1.232.0) The time when the access control policy was created.
- Description string
- The description of the access control policy.
- Dest
Port string - The destination port in the access control policy. Note: If
dest_port_type
is set toport
, you must specifydest_port
. - Dest
Port stringGroup - The name of the destination port address book in the access control policy. Note: If
dest_port_type
is set togroup
, you must specifydest_port_group
. - Dest
Port stringType - The type of the destination port in the access control policy. Valid values:
port
,group
. - Destination string
- The destination address in the access control policy.
- Destination
Type string - The type of the destination address in the access control policy. Valid values:
net
,group
,domain
,location
. - Direction string
- The direction of the traffic to which the access control policy applies. Valid values:
in
,out
. - Domain
Resolve stringType - The domain name resolution method of the access control policy. Valid values:
FQDN
: Fully qualified domain name (FQDN)-based resolution.DNS
: DNS-based dynamic resolution.FQDN_AND_DNS
: FQDN and DNS-based dynamic resolution.
- End
Time int The time when the access control policy stops taking effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes later than the start time.
NOTE: If
repeat_type
is set toNone
,Daily
,Weekly
, orMonthly
,start_time
andend_time
must be set.- Ip
Version string - The IP version supported by the access control policy. Default value:
4
. Valid values: - Lang string
- The language of the content within the request and response. Valid values:
zh
,en
. - Proto string
- The protocol type supported by the access control policy. Valid values:
ANY
,TCP
,UDP
,ICMP
. - Release string
- The status of the access control policy. Valid values:
true
,false
. - Repeat
Days List<int> The days of a week or of a month on which the access control policy takes effect. Valid values:
- If
repeat_type
is set toWeekly
. Valid values:0
to6
. - If
repeat_type
is set toMonthly
. Valid values:1
to31
.
NOTE: If
repeat_type
is set toWeekly
, orMonthly
,repeat_days
must be set.- If
- Repeat
End stringTime The point in time when the recurrence ends. Example:
23:30
. The end time must be on the hour or on the half hour, and at least 30 minutes later than the start time.NOTE: If
repeat_type
is set toDaily
,Weekly
, orMonthly
,repeat_start_time
andrepeat_end_time
must be set.- Repeat
Start stringTime - The point in time when the recurrence starts. Example:
08:00
. The start time must be on the hour or on the half hour, and at least 30 minutes earlier than the end time. - Repeat
Type string - The recurrence type for the access control policy to take effect. Default value:
Permanent
. Valid values:Permanent
: The policy always takes effect.None
: The policy takes effect for only once.Daily
: The policy takes effect on a daily basis.Weekly
: The policy takes effect on a weekly basis.Monthly
: The policy takes effect on a monthly basis.
- Source string
- The source address in the access control policy.
- Source
Ip string - The source IP address of the request.
- Source
Type string - The type of the source address in the access control policy. Valid values:
net
,group
,location
. - Start
Time int - The time when the access control policy starts to take effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes earlier than the end time.
- Acl
Action string - The action that Cloud Firewall performs on the traffic. Valid values:
accept
,drop
,log
. - Acl
Uuid string - (Available since v1.148.0) The unique ID of the access control policy.
- Application
Name string The application type supported by the access control policy. Valid values:
ANY
,HTTP
,HTTPS
,MQTT
,Memcache
,MongoDB
,MySQL
,RDP
,Redis
,SMTP
,SMTPS
,SSH
,SSL
,VNC
.NOTE: If
proto
is set toTCP
, you can setapplication_name
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name
toANY
.- Application
Name []stringLists The application types supported by the access control policy.
NOTE: If
proto
is set toTCP
, you can setapplication_name_list
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name_list
to["ANY"]
. From version 1.232.0, You must specify at least one of theapplication_name_list
andapplication_name
. If you specify bothapplication_name_list
andapplication_name
, only theapplication_name_list
takes effect.- Create
Time string - (Available since v1.232.0) The time when the access control policy was created.
- Description string
- The description of the access control policy.
- Dest
Port string - The destination port in the access control policy. Note: If
dest_port_type
is set toport
, you must specifydest_port
. - Dest
Port stringGroup - The name of the destination port address book in the access control policy. Note: If
dest_port_type
is set togroup
, you must specifydest_port_group
. - Dest
Port stringType - The type of the destination port in the access control policy. Valid values:
port
,group
. - Destination string
- The destination address in the access control policy.
- Destination
Type string - The type of the destination address in the access control policy. Valid values:
net
,group
,domain
,location
. - Direction string
- The direction of the traffic to which the access control policy applies. Valid values:
in
,out
. - Domain
Resolve stringType - The domain name resolution method of the access control policy. Valid values:
FQDN
: Fully qualified domain name (FQDN)-based resolution.DNS
: DNS-based dynamic resolution.FQDN_AND_DNS
: FQDN and DNS-based dynamic resolution.
- End
Time int The time when the access control policy stops taking effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes later than the start time.
NOTE: If
repeat_type
is set toNone
,Daily
,Weekly
, orMonthly
,start_time
andend_time
must be set.- Ip
Version string - The IP version supported by the access control policy. Default value:
4
. Valid values: - Lang string
- The language of the content within the request and response. Valid values:
zh
,en
. - Proto string
- The protocol type supported by the access control policy. Valid values:
ANY
,TCP
,UDP
,ICMP
. - Release string
- The status of the access control policy. Valid values:
true
,false
. - Repeat
Days []int The days of a week or of a month on which the access control policy takes effect. Valid values:
- If
repeat_type
is set toWeekly
. Valid values:0
to6
. - If
repeat_type
is set toMonthly
. Valid values:1
to31
.
NOTE: If
repeat_type
is set toWeekly
, orMonthly
,repeat_days
must be set.- If
- Repeat
End stringTime The point in time when the recurrence ends. Example:
23:30
. The end time must be on the hour or on the half hour, and at least 30 minutes later than the start time.NOTE: If
repeat_type
is set toDaily
,Weekly
, orMonthly
,repeat_start_time
andrepeat_end_time
must be set.- Repeat
Start stringTime - The point in time when the recurrence starts. Example:
08:00
. The start time must be on the hour or on the half hour, and at least 30 minutes earlier than the end time. - Repeat
Type string - The recurrence type for the access control policy to take effect. Default value:
Permanent
. Valid values:Permanent
: The policy always takes effect.None
: The policy takes effect for only once.Daily
: The policy takes effect on a daily basis.Weekly
: The policy takes effect on a weekly basis.Monthly
: The policy takes effect on a monthly basis.
- Source string
- The source address in the access control policy.
- Source
Ip string - The source IP address of the request.
- Source
Type string - The type of the source address in the access control policy. Valid values:
net
,group
,location
. - Start
Time int - The time when the access control policy starts to take effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes earlier than the end time.
- acl
Action String - The action that Cloud Firewall performs on the traffic. Valid values:
accept
,drop
,log
. - acl
Uuid String - (Available since v1.148.0) The unique ID of the access control policy.
- application
Name String The application type supported by the access control policy. Valid values:
ANY
,HTTP
,HTTPS
,MQTT
,Memcache
,MongoDB
,MySQL
,RDP
,Redis
,SMTP
,SMTPS
,SSH
,SSL
,VNC
.NOTE: If
proto
is set toTCP
, you can setapplication_name
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name
toANY
.- application
Name List<String>Lists The application types supported by the access control policy.
NOTE: If
proto
is set toTCP
, you can setapplication_name_list
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name_list
to["ANY"]
. From version 1.232.0, You must specify at least one of theapplication_name_list
andapplication_name
. If you specify bothapplication_name_list
andapplication_name
, only theapplication_name_list
takes effect.- create
Time String - (Available since v1.232.0) The time when the access control policy was created.
- description String
- The description of the access control policy.
- dest
Port String - The destination port in the access control policy. Note: If
dest_port_type
is set toport
, you must specifydest_port
. - dest
Port StringGroup - The name of the destination port address book in the access control policy. Note: If
dest_port_type
is set togroup
, you must specifydest_port_group
. - dest
Port StringType - The type of the destination port in the access control policy. Valid values:
port
,group
. - destination String
- The destination address in the access control policy.
- destination
Type String - The type of the destination address in the access control policy. Valid values:
net
,group
,domain
,location
. - direction String
- The direction of the traffic to which the access control policy applies. Valid values:
in
,out
. - domain
Resolve StringType - The domain name resolution method of the access control policy. Valid values:
FQDN
: Fully qualified domain name (FQDN)-based resolution.DNS
: DNS-based dynamic resolution.FQDN_AND_DNS
: FQDN and DNS-based dynamic resolution.
- end
Time Integer The time when the access control policy stops taking effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes later than the start time.
NOTE: If
repeat_type
is set toNone
,Daily
,Weekly
, orMonthly
,start_time
andend_time
must be set.- ip
Version String - The IP version supported by the access control policy. Default value:
4
. Valid values: - lang String
- The language of the content within the request and response. Valid values:
zh
,en
. - proto String
- The protocol type supported by the access control policy. Valid values:
ANY
,TCP
,UDP
,ICMP
. - release String
- The status of the access control policy. Valid values:
true
,false
. - repeat
Days List<Integer> The days of a week or of a month on which the access control policy takes effect. Valid values:
- If
repeat_type
is set toWeekly
. Valid values:0
to6
. - If
repeat_type
is set toMonthly
. Valid values:1
to31
.
NOTE: If
repeat_type
is set toWeekly
, orMonthly
,repeat_days
must be set.- If
- repeat
End StringTime The point in time when the recurrence ends. Example:
23:30
. The end time must be on the hour or on the half hour, and at least 30 minutes later than the start time.NOTE: If
repeat_type
is set toDaily
,Weekly
, orMonthly
,repeat_start_time
andrepeat_end_time
must be set.- repeat
Start StringTime - The point in time when the recurrence starts. Example:
08:00
. The start time must be on the hour or on the half hour, and at least 30 minutes earlier than the end time. - repeat
Type String - The recurrence type for the access control policy to take effect. Default value:
Permanent
. Valid values:Permanent
: The policy always takes effect.None
: The policy takes effect for only once.Daily
: The policy takes effect on a daily basis.Weekly
: The policy takes effect on a weekly basis.Monthly
: The policy takes effect on a monthly basis.
- source String
- The source address in the access control policy.
- source
Ip String - The source IP address of the request.
- source
Type String - The type of the source address in the access control policy. Valid values:
net
,group
,location
. - start
Time Integer - The time when the access control policy starts to take effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes earlier than the end time.
- acl
Action string - The action that Cloud Firewall performs on the traffic. Valid values:
accept
,drop
,log
. - acl
Uuid string - (Available since v1.148.0) The unique ID of the access control policy.
- application
Name string The application type supported by the access control policy. Valid values:
ANY
,HTTP
,HTTPS
,MQTT
,Memcache
,MongoDB
,MySQL
,RDP
,Redis
,SMTP
,SMTPS
,SSH
,SSL
,VNC
.NOTE: If
proto
is set toTCP
, you can setapplication_name
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name
toANY
.- application
Name string[]Lists The application types supported by the access control policy.
NOTE: If
proto
is set toTCP
, you can setapplication_name_list
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name_list
to["ANY"]
. From version 1.232.0, You must specify at least one of theapplication_name_list
andapplication_name
. If you specify bothapplication_name_list
andapplication_name
, only theapplication_name_list
takes effect.- create
Time string - (Available since v1.232.0) The time when the access control policy was created.
- description string
- The description of the access control policy.
- dest
Port string - The destination port in the access control policy. Note: If
dest_port_type
is set toport
, you must specifydest_port
. - dest
Port stringGroup - The name of the destination port address book in the access control policy. Note: If
dest_port_type
is set togroup
, you must specifydest_port_group
. - dest
Port stringType - The type of the destination port in the access control policy. Valid values:
port
,group
. - destination string
- The destination address in the access control policy.
- destination
Type string - The type of the destination address in the access control policy. Valid values:
net
,group
,domain
,location
. - direction string
- The direction of the traffic to which the access control policy applies. Valid values:
in
,out
. - domain
Resolve stringType - The domain name resolution method of the access control policy. Valid values:
FQDN
: Fully qualified domain name (FQDN)-based resolution.DNS
: DNS-based dynamic resolution.FQDN_AND_DNS
: FQDN and DNS-based dynamic resolution.
- end
Time number The time when the access control policy stops taking effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes later than the start time.
NOTE: If
repeat_type
is set toNone
,Daily
,Weekly
, orMonthly
,start_time
andend_time
must be set.- ip
Version string - The IP version supported by the access control policy. Default value:
4
. Valid values: - lang string
- The language of the content within the request and response. Valid values:
zh
,en
. - proto string
- The protocol type supported by the access control policy. Valid values:
ANY
,TCP
,UDP
,ICMP
. - release string
- The status of the access control policy. Valid values:
true
,false
. - repeat
Days number[] The days of a week or of a month on which the access control policy takes effect. Valid values:
- If
repeat_type
is set toWeekly
. Valid values:0
to6
. - If
repeat_type
is set toMonthly
. Valid values:1
to31
.
NOTE: If
repeat_type
is set toWeekly
, orMonthly
,repeat_days
must be set.- If
- repeat
End stringTime The point in time when the recurrence ends. Example:
23:30
. The end time must be on the hour or on the half hour, and at least 30 minutes later than the start time.NOTE: If
repeat_type
is set toDaily
,Weekly
, orMonthly
,repeat_start_time
andrepeat_end_time
must be set.- repeat
Start stringTime - The point in time when the recurrence starts. Example:
08:00
. The start time must be on the hour or on the half hour, and at least 30 minutes earlier than the end time. - repeat
Type string - The recurrence type for the access control policy to take effect. Default value:
Permanent
. Valid values:Permanent
: The policy always takes effect.None
: The policy takes effect for only once.Daily
: The policy takes effect on a daily basis.Weekly
: The policy takes effect on a weekly basis.Monthly
: The policy takes effect on a monthly basis.
- source string
- The source address in the access control policy.
- source
Ip string - The source IP address of the request.
- source
Type string - The type of the source address in the access control policy. Valid values:
net
,group
,location
. - start
Time number - The time when the access control policy starts to take effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes earlier than the end time.
- acl_
action str - The action that Cloud Firewall performs on the traffic. Valid values:
accept
,drop
,log
. - acl_
uuid str - (Available since v1.148.0) The unique ID of the access control policy.
- application_
name str The application type supported by the access control policy. Valid values:
ANY
,HTTP
,HTTPS
,MQTT
,Memcache
,MongoDB
,MySQL
,RDP
,Redis
,SMTP
,SMTPS
,SSH
,SSL
,VNC
.NOTE: If
proto
is set toTCP
, you can setapplication_name
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name
toANY
.- application_
name_ Sequence[str]lists The application types supported by the access control policy.
NOTE: If
proto
is set toTCP
, you can setapplication_name_list
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name_list
to["ANY"]
. From version 1.232.0, You must specify at least one of theapplication_name_list
andapplication_name
. If you specify bothapplication_name_list
andapplication_name
, only theapplication_name_list
takes effect.- create_
time str - (Available since v1.232.0) The time when the access control policy was created.
- description str
- The description of the access control policy.
- dest_
port str - The destination port in the access control policy. Note: If
dest_port_type
is set toport
, you must specifydest_port
. - dest_
port_ strgroup - The name of the destination port address book in the access control policy. Note: If
dest_port_type
is set togroup
, you must specifydest_port_group
. - dest_
port_ strtype - The type of the destination port in the access control policy. Valid values:
port
,group
. - destination str
- The destination address in the access control policy.
- destination_
type str - The type of the destination address in the access control policy. Valid values:
net
,group
,domain
,location
. - direction str
- The direction of the traffic to which the access control policy applies. Valid values:
in
,out
. - domain_
resolve_ strtype - The domain name resolution method of the access control policy. Valid values:
FQDN
: Fully qualified domain name (FQDN)-based resolution.DNS
: DNS-based dynamic resolution.FQDN_AND_DNS
: FQDN and DNS-based dynamic resolution.
- end_
time int The time when the access control policy stops taking effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes later than the start time.
NOTE: If
repeat_type
is set toNone
,Daily
,Weekly
, orMonthly
,start_time
andend_time
must be set.- ip_
version str - The IP version supported by the access control policy. Default value:
4
. Valid values: - lang str
- The language of the content within the request and response. Valid values:
zh
,en
. - proto str
- The protocol type supported by the access control policy. Valid values:
ANY
,TCP
,UDP
,ICMP
. - release str
- The status of the access control policy. Valid values:
true
,false
. - repeat_
days Sequence[int] The days of a week or of a month on which the access control policy takes effect. Valid values:
- If
repeat_type
is set toWeekly
. Valid values:0
to6
. - If
repeat_type
is set toMonthly
. Valid values:1
to31
.
NOTE: If
repeat_type
is set toWeekly
, orMonthly
,repeat_days
must be set.- If
- repeat_
end_ strtime The point in time when the recurrence ends. Example:
23:30
. The end time must be on the hour or on the half hour, and at least 30 minutes later than the start time.NOTE: If
repeat_type
is set toDaily
,Weekly
, orMonthly
,repeat_start_time
andrepeat_end_time
must be set.- repeat_
start_ strtime - The point in time when the recurrence starts. Example:
08:00
. The start time must be on the hour or on the half hour, and at least 30 minutes earlier than the end time. - repeat_
type str - The recurrence type for the access control policy to take effect. Default value:
Permanent
. Valid values:Permanent
: The policy always takes effect.None
: The policy takes effect for only once.Daily
: The policy takes effect on a daily basis.Weekly
: The policy takes effect on a weekly basis.Monthly
: The policy takes effect on a monthly basis.
- source str
- The source address in the access control policy.
- source_
ip str - The source IP address of the request.
- source_
type str - The type of the source address in the access control policy. Valid values:
net
,group
,location
. - start_
time int - The time when the access control policy starts to take effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes earlier than the end time.
- acl
Action String - The action that Cloud Firewall performs on the traffic. Valid values:
accept
,drop
,log
. - acl
Uuid String - (Available since v1.148.0) The unique ID of the access control policy.
- application
Name String The application type supported by the access control policy. Valid values:
ANY
,HTTP
,HTTPS
,MQTT
,Memcache
,MongoDB
,MySQL
,RDP
,Redis
,SMTP
,SMTPS
,SSH
,SSL
,VNC
.NOTE: If
proto
is set toTCP
, you can setapplication_name
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name
toANY
.- application
Name List<String>Lists The application types supported by the access control policy.
NOTE: If
proto
is set toTCP
, you can setapplication_name_list
to any valid value. Ifproto
is set toUDP
,ICMP
, orANY
, you can only setapplication_name_list
to["ANY"]
. From version 1.232.0, You must specify at least one of theapplication_name_list
andapplication_name
. If you specify bothapplication_name_list
andapplication_name
, only theapplication_name_list
takes effect.- create
Time String - (Available since v1.232.0) The time when the access control policy was created.
- description String
- The description of the access control policy.
- dest
Port String - The destination port in the access control policy. Note: If
dest_port_type
is set toport
, you must specifydest_port
. - dest
Port StringGroup - The name of the destination port address book in the access control policy. Note: If
dest_port_type
is set togroup
, you must specifydest_port_group
. - dest
Port StringType - The type of the destination port in the access control policy. Valid values:
port
,group
. - destination String
- The destination address in the access control policy.
- destination
Type String - The type of the destination address in the access control policy. Valid values:
net
,group
,domain
,location
. - direction String
- The direction of the traffic to which the access control policy applies. Valid values:
in
,out
. - domain
Resolve StringType - The domain name resolution method of the access control policy. Valid values:
FQDN
: Fully qualified domain name (FQDN)-based resolution.DNS
: DNS-based dynamic resolution.FQDN_AND_DNS
: FQDN and DNS-based dynamic resolution.
- end
Time Number The time when the access control policy stops taking effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes later than the start time.
NOTE: If
repeat_type
is set toNone
,Daily
,Weekly
, orMonthly
,start_time
andend_time
must be set.- ip
Version String - The IP version supported by the access control policy. Default value:
4
. Valid values: - lang String
- The language of the content within the request and response. Valid values:
zh
,en
. - proto String
- The protocol type supported by the access control policy. Valid values:
ANY
,TCP
,UDP
,ICMP
. - release String
- The status of the access control policy. Valid values:
true
,false
. - repeat
Days List<Number> The days of a week or of a month on which the access control policy takes effect. Valid values:
- If
repeat_type
is set toWeekly
. Valid values:0
to6
. - If
repeat_type
is set toMonthly
. Valid values:1
to31
.
NOTE: If
repeat_type
is set toWeekly
, orMonthly
,repeat_days
must be set.- If
- repeat
End StringTime The point in time when the recurrence ends. Example:
23:30
. The end time must be on the hour or on the half hour, and at least 30 minutes later than the start time.NOTE: If
repeat_type
is set toDaily
,Weekly
, orMonthly
,repeat_start_time
andrepeat_end_time
must be set.- repeat
Start StringTime - The point in time when the recurrence starts. Example:
08:00
. The start time must be on the hour or on the half hour, and at least 30 minutes earlier than the end time. - repeat
Type String - The recurrence type for the access control policy to take effect. Default value:
Permanent
. Valid values:Permanent
: The policy always takes effect.None
: The policy takes effect for only once.Daily
: The policy takes effect on a daily basis.Weekly
: The policy takes effect on a weekly basis.Monthly
: The policy takes effect on a monthly basis.
- source String
- The source address in the access control policy.
- source
Ip String - The source IP address of the request.
- source
Type String - The type of the source address in the access control policy. Valid values:
net
,group
,location
. - start
Time Number - The time when the access control policy starts to take effect. The value is a UNIX timestamp. Unit: seconds. The value must be on the hour or on the half hour, and at least 30 minutes earlier than the end time.
Import
Cloud Firewall Control Policy can be imported using the id, e.g.
$ pulumi import alicloud:cloudfirewall/controlPolicy:ControlPolicy example <acl_uuid>:<direction>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.