ControlPolicyArgs

data class ControlPolicyArgs(val aclAction: Output<String>? = null, val applicationName: Output<String>? = null, val applicationNameLists: Output<List<String>>? = null, val description: Output<String>? = null, val destPort: Output<String>? = null, val destPortGroup: Output<String>? = null, val destPortType: Output<String>? = null, val destination: Output<String>? = null, val destinationType: Output<String>? = null, val direction: Output<String>? = null, val domainResolveType: Output<String>? = null, val endTime: Output<Int>? = null, val ipVersion: Output<String>? = null, val lang: Output<String>? = null, val proto: Output<String>? = null, val release: Output<String>? = null, val repeatDays: Output<List<Int>>? = null, val repeatEndTime: Output<String>? = null, val repeatStartTime: Output<String>? = null, val repeatType: Output<String>? = null, val source: Output<String>? = null, val sourceIp: Output<String>? = null, val sourceType: Output<String>? = null, val startTime: Output<Int>? = null) : ConvertibleToJava<ControlPolicyArgs>

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>

Constructors

Link copied to clipboard
constructor(aclAction: Output<String>? = null, applicationName: Output<String>? = null, applicationNameLists: Output<List<String>>? = null, description: Output<String>? = null, destPort: Output<String>? = null, destPortGroup: Output<String>? = null, destPortType: Output<String>? = null, destination: Output<String>? = null, destinationType: Output<String>? = null, direction: Output<String>? = null, domainResolveType: Output<String>? = null, endTime: Output<Int>? = null, ipVersion: Output<String>? = null, lang: Output<String>? = null, proto: Output<String>? = null, release: Output<String>? = null, repeatDays: Output<List<Int>>? = null, repeatEndTime: Output<String>? = null, repeatStartTime: Output<String>? = null, repeatType: Output<String>? = null, source: Output<String>? = null, sourceIp: Output<String>? = null, sourceType: Output<String>? = null, startTime: Output<Int>? = null)

Properties

Link copied to clipboard
val aclAction: Output<String>? = null

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

Link copied to clipboard
val applicationName: Output<String>? = null

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
val applicationNameLists: Output<List<String>>? = null

The application types supported by the access control policy.

Link copied to clipboard
val description: Output<String>? = null

The description of the access control policy.

Link copied to clipboard
val destination: Output<String>? = null

The destination address in the access control policy.

Link copied to clipboard
val destinationType: Output<String>? = null

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>? = null

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>? = null

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>? = null

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

Link copied to clipboard
val direction: Output<String>? = null

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

Link copied to clipboard
val domainResolveType: Output<String>? = null

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

Link copied to clipboard
val endTime: Output<Int>? = null

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 ipVersion: Output<String>? = null

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

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

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

Link copied to clipboard
val proto: Output<String>? = null

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

Link copied to clipboard
val release: Output<String>? = null

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

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

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>? = null

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>? = null

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>? = null

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

Link copied to clipboard
val source: Output<String>? = null

The source address in the access control policy.

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

The source IP address of the request.

Link copied to clipboard
val sourceType: Output<String>? = null

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

Link copied to clipboard
val startTime: Output<Int>? = null

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.

Functions

Link copied to clipboard
open override fun toJava(): ControlPolicyArgs