ControlPolicy

class ControlPolicy : KotlinCustomResource

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")
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 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
})
}
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

Import

Cloud Firewall Control Policy can be imported using the id, e.g.

$ pulumi import alicloud:cloudfirewall/controlPolicy:ControlPolicy example <acl_uuid>:<direction>

Properties

Link copied to clipboard
val aclAction: Output<String>

The action that Cloud Firewall performs on the traffic. Valid values: accept, drop, log.

Link copied to clipboard
val aclUuid: Output<String>

(Available since v1.148.0) The unique ID of the access control policy.

Link copied to clipboard
val applicationName: Output<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.

Link copied to clipboard

The application types supported by the access control policy.

Link copied to clipboard
val createTime: Output<String>

(Available since v1.232.0) The time when the access control policy was created.

Link copied to clipboard
val description: Output<String>

The description of the access control policy.

Link copied to clipboard
val destination: Output<String>

The destination address in the access control policy.

Link copied to clipboard
val destinationType: Output<String>

The type of the destination address in the access control policy. Valid values: net, group, domain, location.

Link copied to clipboard
val destPort: Output<String>

The destination port in the access control policy. Note: If dest_port_type is set to port, you must specify dest_port.

Link copied to clipboard
val destPortGroup: Output<String>?

The name of the destination port address book in the access control policy. Note: If dest_port_type is set to group, you must specify dest_port_group.

Link copied to clipboard
val destPortType: Output<String>

The type of the destination port in the access control policy. Valid values: port, group.

Link copied to clipboard
val direction: Output<String>

The direction of the traffic to which the access control policy applies. Valid values: in, out.

Link copied to clipboard

The domain name resolution method of the access control policy. Valid values:

Link copied to clipboard
val endTime: Output<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.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val ipVersion: Output<String>

The IP version supported by the access control policy. Default value: 4. Valid values:

Link copied to clipboard
val lang: Output<String>?

The language of the content within the request and response. Valid values: zh, en.

Link copied to clipboard
val proto: Output<String>

The protocol type supported by the access control policy. Valid values: ANY, TCP, UDP, ICMP.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val release: Output<String>

The status of the access control policy. Valid values: true, false.

Link copied to clipboard
val repeatDays: Output<List<Int>>?

The days of a week or of a month on which the access control policy takes effect. Valid values:

Link copied to clipboard
val repeatEndTime: Output<String>?

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.

Link copied to clipboard
val repeatStartTime: Output<String>?

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.

Link copied to clipboard
val repeatType: Output<String>

The recurrence type for the access control policy to take effect. Default value: Permanent. Valid values:

Link copied to clipboard
val source: Output<String>

The source address in the access control policy.

Link copied to clipboard
val sourceIp: Output<String>?

The source IP address of the request.

Link copied to clipboard
val sourceType: Output<String>

The type of the source address in the access control policy. Valid values: net, group, location.

Link copied to clipboard
val startTime: Output<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.

Link copied to clipboard
val urn: Output<String>