alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.rocketmq.AclRule

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 in 1.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

Coming soon!

Coming soon!

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) {
        var defaultAcl = new Acl("defaultAcl", AclArgs.builder()        
            .sagCount("0")
            .build());

        var defaultAclRule = new AclRule("defaultAclRule", AclRuleArgs.builder()        
            .aclId(defaultAcl.id())
            .description("tf-testSagAclRule")
            .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());

    }
}

Coming soon!

Coming soon!

resources:
  defaultAcl:
    type: alicloud:rocketmq:Acl
    properties:
      sagCount: '0'
  defaultAclRule:
    type: alicloud:rocketmq:AclRule
    properties:
      aclId: ${defaultAcl.id}
      description: tf-testSagAclRule
      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'

Create AclRule Resource

new AclRule(name: string, args: AclRuleArgs, opts?: CustomResourceOptions);
@overload
def AclRule(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            acl_id: Optional[str] = None,
            description: Optional[str] = None,
            dest_cidr: Optional[str] = None,
            dest_port_range: Optional[str] = None,
            direction: Optional[str] = None,
            ip_protocol: Optional[str] = None,
            policy: Optional[str] = None,
            priority: Optional[int] = None,
            source_cidr: Optional[str] = None,
            source_port_range: Optional[str] = None)
@overload
def AclRule(resource_name: str,
            args: AclRuleArgs,
            opts: Optional[ResourceOptions] = None)
func NewAclRule(ctx *Context, name string, args AclRuleArgs, opts ...ResourceOption) (*AclRule, error)
public AclRule(string name, AclRuleArgs args, CustomResourceOptions? opts = null)
public AclRule(String name, AclRuleArgs args)
public AclRule(String name, AclRuleArgs args, CustomResourceOptions options)
type: alicloud:rocketmq:AclRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AclRuleArgs
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 AclRuleArgs
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 AclRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AclRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AclRuleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

AclRule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The AclRule resource accepts the following input properties:

AclId string

The ID of the ACL.

DestCidr string

The destination address. It is an IPv4 address range in CIDR format. Default value: 0.0.0.0/0.

DestPortRange string

The range of the destination port. Valid value: 80/80.

Direction string

The direction of the ACL rule. Valid values: in|out.

IpProtocol string

The protocol used by the ACL rule. The value is not case sensitive.

Policy string

The policy used by the ACL rule. Valid values: accept|drop.

SourceCidr string

The source address. It is an IPv4 address range in the CIDR format. Default value: 0.0.0.0/0.

SourcePortRange string

The range of the source port. Valid value: 80/80.

Description string

The description of the ACL rule. It must be 1 to 512 characters in length.

Priority int

The priority of the ACL rule. Value range: 1 to 100.

AclId string

The ID of the ACL.

DestCidr string

The destination address. It is an IPv4 address range in CIDR format. Default value: 0.0.0.0/0.

DestPortRange string

The range of the destination port. Valid value: 80/80.

Direction string

The direction of the ACL rule. Valid values: in|out.

IpProtocol string

The protocol used by the ACL rule. The value is not case sensitive.

Policy string

The policy used by the ACL rule. Valid values: accept|drop.

SourceCidr string

The source address. It is an IPv4 address range in the CIDR format. Default value: 0.0.0.0/0.

SourcePortRange string

The range of the source port. Valid value: 80/80.

Description string

The description of the ACL rule. It must be 1 to 512 characters in length.

Priority int

The priority of the ACL rule. Value range: 1 to 100.

aclId String

The ID of the ACL.

destCidr String

The destination address. It is an IPv4 address range in CIDR format. Default value: 0.0.0.0/0.

destPortRange String

The range of the destination port. Valid value: 80/80.

direction String

The direction of the ACL rule. Valid values: in|out.

ipProtocol String

The protocol used by the ACL rule. The value is not case sensitive.

policy String

The policy used by the ACL rule. Valid values: accept|drop.

sourceCidr String

The source address. It is an IPv4 address range in the CIDR format. Default value: 0.0.0.0/0.

sourcePortRange String

The range of the source port. Valid value: 80/80.

description String

The description of the ACL rule. It must be 1 to 512 characters in length.

priority Integer

The priority of the ACL rule. Value range: 1 to 100.

aclId string

The ID of the ACL.

destCidr string

The destination address. It is an IPv4 address range in CIDR format. Default value: 0.0.0.0/0.

destPortRange string

The range of the destination port. Valid value: 80/80.

direction string

The direction of the ACL rule. Valid values: in|out.

ipProtocol string

The protocol used by the ACL rule. The value is not case sensitive.

policy string

The policy used by the ACL rule. Valid values: accept|drop.

sourceCidr string

The source address. It is an IPv4 address range in the CIDR format. Default value: 0.0.0.0/0.

sourcePortRange string

The range of the source port. Valid value: 80/80.

description string

The description of the ACL rule. It must be 1 to 512 characters in length.

priority number

The priority of the ACL rule. Value range: 1 to 100.

acl_id str

The ID of the ACL.

dest_cidr str

The destination address. It is an IPv4 address range in CIDR format. Default value: 0.0.0.0/0.

dest_port_range str

The range of the destination port. Valid value: 80/80.

direction str

The direction of the ACL rule. Valid values: in|out.

ip_protocol str

The protocol used by the ACL rule. The value is not case sensitive.

policy str

The policy used by the ACL rule. Valid values: accept|drop.

source_cidr str

The source address. It is an IPv4 address range in the CIDR format. Default value: 0.0.0.0/0.

source_port_range str

The range of the source port. Valid value: 80/80.

description str

The description of the ACL rule. It must be 1 to 512 characters in length.

priority int

The priority of the ACL rule. Value range: 1 to 100.

aclId String

The ID of the ACL.

destCidr String

The destination address. It is an IPv4 address range in CIDR format. Default value: 0.0.0.0/0.

destPortRange String

The range of the destination port. Valid value: 80/80.

direction String

The direction of the ACL rule. Valid values: in|out.

ipProtocol String

The protocol used by the ACL rule. The value is not case sensitive.

policy String

The policy used by the ACL rule. Valid values: accept|drop.

sourceCidr String

The source address. It is an IPv4 address range in the CIDR format. Default value: 0.0.0.0/0.

sourcePortRange String

The range of the source port. Valid value: 80/80.

description String

The description of the ACL rule. It must be 1 to 512 characters in length.

priority Number

The priority of the ACL rule. Value range: 1 to 100.

Outputs

All input properties are implicitly available as output properties. Additionally, the AclRule resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing AclRule Resource

Get an existing AclRule 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?: AclRuleState, opts?: CustomResourceOptions): AclRule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        acl_id: Optional[str] = None,
        description: Optional[str] = None,
        dest_cidr: Optional[str] = None,
        dest_port_range: Optional[str] = None,
        direction: Optional[str] = None,
        ip_protocol: Optional[str] = None,
        policy: Optional[str] = None,
        priority: Optional[int] = None,
        source_cidr: Optional[str] = None,
        source_port_range: Optional[str] = None) -> AclRule
func GetAclRule(ctx *Context, name string, id IDInput, state *AclRuleState, opts ...ResourceOption) (*AclRule, error)
public static AclRule Get(string name, Input<string> id, AclRuleState? state, CustomResourceOptions? opts = null)
public static AclRule get(String name, Output<String> id, AclRuleState 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.
The following state arguments are supported:
AclId string

The ID of the ACL.

Description string

The description of the ACL rule. It must be 1 to 512 characters in length.

DestCidr string

The destination address. It is an IPv4 address range in CIDR format. Default value: 0.0.0.0/0.

DestPortRange string

The range of the destination port. Valid value: 80/80.

Direction string

The direction of the ACL rule. Valid values: in|out.

IpProtocol string

The protocol used by the ACL rule. The value is not case sensitive.

Policy string

The policy used by the ACL rule. Valid values: accept|drop.

Priority int

The priority of the ACL rule. Value range: 1 to 100.

SourceCidr string

The source address. It is an IPv4 address range in the CIDR format. Default value: 0.0.0.0/0.

SourcePortRange string

The range of the source port. Valid value: 80/80.

AclId string

The ID of the ACL.

Description string

The description of the ACL rule. It must be 1 to 512 characters in length.

DestCidr string

The destination address. It is an IPv4 address range in CIDR format. Default value: 0.0.0.0/0.

DestPortRange string

The range of the destination port. Valid value: 80/80.

Direction string

The direction of the ACL rule. Valid values: in|out.

IpProtocol string

The protocol used by the ACL rule. The value is not case sensitive.

Policy string

The policy used by the ACL rule. Valid values: accept|drop.

Priority int

The priority of the ACL rule. Value range: 1 to 100.

SourceCidr string

The source address. It is an IPv4 address range in the CIDR format. Default value: 0.0.0.0/0.

SourcePortRange string

The range of the source port. Valid value: 80/80.

aclId String

The ID of the ACL.

description String

The description of the ACL rule. It must be 1 to 512 characters in length.

destCidr String

The destination address. It is an IPv4 address range in CIDR format. Default value: 0.0.0.0/0.

destPortRange String

The range of the destination port. Valid value: 80/80.

direction String

The direction of the ACL rule. Valid values: in|out.

ipProtocol String

The protocol used by the ACL rule. The value is not case sensitive.

policy String

The policy used by the ACL rule. Valid values: accept|drop.

priority Integer

The priority of the ACL rule. Value range: 1 to 100.

sourceCidr String

The source address. It is an IPv4 address range in the CIDR format. Default value: 0.0.0.0/0.

sourcePortRange String

The range of the source port. Valid value: 80/80.

aclId string

The ID of the ACL.

description string

The description of the ACL rule. It must be 1 to 512 characters in length.

destCidr string

The destination address. It is an IPv4 address range in CIDR format. Default value: 0.0.0.0/0.

destPortRange string

The range of the destination port. Valid value: 80/80.

direction string

The direction of the ACL rule. Valid values: in|out.

ipProtocol string

The protocol used by the ACL rule. The value is not case sensitive.

policy string

The policy used by the ACL rule. Valid values: accept|drop.

priority number

The priority of the ACL rule. Value range: 1 to 100.

sourceCidr string

The source address. It is an IPv4 address range in the CIDR format. Default value: 0.0.0.0/0.

sourcePortRange string

The range of the source port. Valid value: 80/80.

acl_id str

The ID of the ACL.

description str

The description of the ACL rule. It must be 1 to 512 characters in length.

dest_cidr str

The destination address. It is an IPv4 address range in CIDR format. Default value: 0.0.0.0/0.

dest_port_range str

The range of the destination port. Valid value: 80/80.

direction str

The direction of the ACL rule. Valid values: in|out.

ip_protocol str

The protocol used by the ACL rule. The value is not case sensitive.

policy str

The policy used by the ACL rule. Valid values: accept|drop.

priority int

The priority of the ACL rule. Value range: 1 to 100.

source_cidr str

The source address. It is an IPv4 address range in the CIDR format. Default value: 0.0.0.0/0.

source_port_range str

The range of the source port. Valid value: 80/80.

aclId String

The ID of the ACL.

description String

The description of the ACL rule. It must be 1 to 512 characters in length.

destCidr String

The destination address. It is an IPv4 address range in CIDR format. Default value: 0.0.0.0/0.

destPortRange String

The range of the destination port. Valid value: 80/80.

direction String

The direction of the ACL rule. Valid values: in|out.

ipProtocol String

The protocol used by the ACL rule. The value is not case sensitive.

policy String

The policy used by the ACL rule. Valid values: accept|drop.

priority Number

The priority of the ACL rule. Value range: 1 to 100.

sourceCidr String

The source address. It is an IPv4 address range in the CIDR format. Default value: 0.0.0.0/0.

sourcePortRange String

The range of the source port. Valid value: 80/80.

Import

The Sag Acl Rule can be imported using the id, e.g.

 $ pulumi import alicloud:rocketmq/aclRule:AclRule example acr-abc123456

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.