Acl Rule Args
data class AclRuleArgs(val aclId: Output<String>? = null, val description: Output<String>? = null, val destCidr: Output<String>? = null, val destPortRange: Output<String>? = null, val direction: Output<String>? = null, val ipProtocol: Output<String>? = null, val policy: Output<String>? = null, val priority: Output<Int>? = null, val sourceCidr: Output<String>? = null, val sourcePortRange: Output<String>? = null) : ConvertibleToJava<AclRuleArgs>
Provides a Sag Acl Rule resource. This topic describes how to configure an access control list (ACL) rule for a target Smart Access Gateway instance to permit or deny access to or from specified IP addresses in the ACL rule. For information about Sag Acl Rule and how to use it, see What is access control list (ACL) rule.
NOTE: Available since v1.60.0. NOTE: Only the following regions support create Cloud Connect Network. `cn-shanghai`, `cn-shanghai-finance-1`, `cn-hongkong`, `ap-southeast-1`, `ap-southeast-2`, `ap-southeast-3`, `ap-southeast-5`, `ap-northeast-1`, `eu-central-1`
Example Usage
Basic Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.rocketmq.Acl;
import com.pulumi.alicloud.rocketmq.AclRule;
import com.pulumi.alicloud.rocketmq.AclRuleArgs;
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("tf_example");
var defaultAcl = new Acl("defaultAcl");
var defaultAclRule = new AclRule("defaultAclRule", AclRuleArgs.builder()
.aclId(defaultAcl.id())
.description(name)
.policy("accept")
.ipProtocol("ALL")
.direction("in")
.sourceCidr("10.10.1.0/24")
.sourcePortRange("-1/-1")
.destCidr("192.168.1.0/24")
.destPortRange("-1/-1")
.priority("1")
.build());
}
}
Content copied to clipboard
Import
The Sag Acl Rule can be imported using the id, e.g.
$ pulumi import alicloud:rocketmq/aclRule:AclRule example acr-abc123456
Content copied to clipboard
Constructors
Link copied to clipboard
fun AclRuleArgs(aclId: Output<String>? = null, description: Output<String>? = null, destCidr: Output<String>? = null, destPortRange: Output<String>? = null, direction: Output<String>? = null, ipProtocol: Output<String>? = null, policy: Output<String>? = null, priority: Output<Int>? = null, sourceCidr: Output<String>? = null, sourcePortRange: Output<String>? = null)