All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.alicloud.rocketmq.AclRule Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.alicloud.rocketmq;

import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.rocketmq.AclRuleArgs;
import com.pulumi.alicloud.rocketmq.inputs.AclRuleState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Integer;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * 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](https://www.alibabacloud.com/help/en/smart-access-gateway/latest/addaclrule).
 * 
 * > **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-3`, `ap-southeast-5`, `ap-northeast-1`, `eu-central-1`]
 * 
 * ## Example Usage
 * 
 * Basic Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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.AclArgs;
 * 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 default_ = new Acl("default", AclArgs.builder()
 *             .name(name)
 *             .build());
 * 
 *         var defaultAclRule = new AclRule("defaultAclRule", AclRuleArgs.builder()
 *             .aclId(default_.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());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * The Sag Acl Rule can be imported using the id, e.g. * * ```sh * $ pulumi import alicloud:rocketmq/aclRule:AclRule example acr-abc123456 * ``` * */ @ResourceType(type="alicloud:rocketmq/aclRule:AclRule") public class AclRule extends com.pulumi.resources.CustomResource { /** * The ID of the ACL. * */ @Export(name="aclId", refs={String.class}, tree="[0]") private Output aclId; /** * @return The ID of the ACL. * */ public Output aclId() { return this.aclId; } /** * The description of the ACL rule. It must be 1 to 512 characters in length. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return The description of the ACL rule. It must be 1 to 512 characters in length. * */ public Output> description() { return Codegen.optional(this.description); } /** * The destination address. It is an IPv4 address range in CIDR format. Default value: 0.0.0.0/0. * */ @Export(name="destCidr", refs={String.class}, tree="[0]") private Output destCidr; /** * @return The destination address. It is an IPv4 address range in CIDR format. Default value: 0.0.0.0/0. * */ public Output destCidr() { return this.destCidr; } /** * The range of the destination port. Valid value: 80/80. * */ @Export(name="destPortRange", refs={String.class}, tree="[0]") private Output destPortRange; /** * @return The range of the destination port. Valid value: 80/80. * */ public Output destPortRange() { return this.destPortRange; } /** * The direction of the ACL rule. Valid values: in|out. * */ @Export(name="direction", refs={String.class}, tree="[0]") private Output direction; /** * @return The direction of the ACL rule. Valid values: in|out. * */ public Output direction() { return this.direction; } /** * The protocol used by the ACL rule. The value is not case sensitive. * */ @Export(name="ipProtocol", refs={String.class}, tree="[0]") private Output ipProtocol; /** * @return The protocol used by the ACL rule. The value is not case sensitive. * */ public Output ipProtocol() { return this.ipProtocol; } /** * The policy used by the ACL rule. Valid values: accept|drop. * */ @Export(name="policy", refs={String.class}, tree="[0]") private Output policy; /** * @return The policy used by the ACL rule. Valid values: accept|drop. * */ public Output policy() { return this.policy; } /** * The priority of the ACL rule. Value range: 1 to 100. * */ @Export(name="priority", refs={Integer.class}, tree="[0]") private Output priority; /** * @return The priority of the ACL rule. Value range: 1 to 100. * */ public Output> priority() { return Codegen.optional(this.priority); } /** * The source address. It is an IPv4 address range in the CIDR format. Default value: 0.0.0.0/0. * */ @Export(name="sourceCidr", refs={String.class}, tree="[0]") private Output sourceCidr; /** * @return The source address. It is an IPv4 address range in the CIDR format. Default value: 0.0.0.0/0. * */ public Output sourceCidr() { return this.sourceCidr; } /** * The range of the source port. Valid value: 80/80. * */ @Export(name="sourcePortRange", refs={String.class}, tree="[0]") private Output sourcePortRange; /** * @return The range of the source port. Valid value: 80/80. * */ public Output sourcePortRange() { return this.sourcePortRange; } /** * * @param name The _unique_ name of the resulting resource. */ public AclRule(java.lang.String name) { this(name, AclRuleArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public AclRule(java.lang.String name, AclRuleArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public AclRule(java.lang.String name, AclRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:rocketmq/aclRule:AclRule", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private AclRule(java.lang.String name, Output id, @Nullable AclRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:rocketmq/aclRule:AclRule", name, state, makeResourceOptions(options, id), false); } private static AclRuleArgs makeArgs(AclRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? AclRuleArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static AclRule get(java.lang.String name, Output id, @Nullable AclRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new AclRule(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy