1. Packages
  2. RedisCloud
  3. API Docs
  4. AclRule
Redis Cloud v1.3.5 published on Wednesday, Dec 20, 2023 by RedisLabs

rediscloud.AclRule

Explore with Pulumi AI

rediscloud logo
Redis Cloud v1.3.5 published on Wednesday, Dec 20, 2023 by RedisLabs

    Creates a Rule (a.k.a Redis Rule, Redis ACL) in your Redis Enterprise Cloud Account.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Rediscloud = RedisLabs.Rediscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var rule_resource = new Rediscloud.AclRule("rule-resource", new()
        {
            Rule = "+@read ~cache:*",
        });
    
    });
    
    package main
    
    import (
    	"github.com/RedisLabs/pulumi-rediscloud/sdk/go/rediscloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := rediscloud.NewAclRule(ctx, "rule-resource", &rediscloud.AclRuleArgs{
    			Rule: pulumi.String("+@read ~cache:*"),
    		})
    		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.rediscloud.AclRule;
    import com.pulumi.rediscloud.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 rule_resource = new AclRule("rule-resource", AclRuleArgs.builder()        
                .rule("+@read ~cache:*")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_rediscloud as rediscloud
    
    rule_resource = rediscloud.AclRule("rule-resource", rule="+@read ~cache:*")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as rediscloud from "@rediscloud/pulumi-rediscloud";
    
    const rule_resource = new rediscloud.AclRule("rule-resource", {rule: "+@read ~cache:*"});
    
    resources:
      rule-resource:
        type: rediscloud:AclRule
        properties:
          rule: +@read ~cache:*
    

    Create AclRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AclRule(name: string, args: AclRuleArgs, opts?: CustomResourceOptions);
    @overload
    def AclRule(resource_name: str,
                args: AclRuleArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def AclRule(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                rule: Optional[str] = None,
                name: Optional[str] = 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: rediscloud:AclRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    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.

    Example

    The following reference example uses placeholder values for all input properties.

    var aclRuleResource = new Rediscloud.AclRule("aclRuleResource", new()
    {
        Rule = "string",
        Name = "string",
    });
    
    example, err := rediscloud.NewAclRule(ctx, "aclRuleResource", &rediscloud.AclRuleArgs{
    	Rule: pulumi.String("string"),
    	Name: pulumi.String("string"),
    })
    
    var aclRuleResource = new AclRule("aclRuleResource", AclRuleArgs.builder()        
        .rule("string")
        .name("string")
        .build());
    
    acl_rule_resource = rediscloud.AclRule("aclRuleResource",
        rule="string",
        name="string")
    
    const aclRuleResource = new rediscloud.AclRule("aclRuleResource", {
        rule: "string",
        name: "string",
    });
    
    type: rediscloud:AclRule
    properties:
        name: string
        rule: string
    

    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:

    Rule string
    The ACL rule itself, built up as permissions/restrictions written in the ACL Syntax.
    Name string
    A meaningful name for the rule. Must be unique.
    Rule string
    The ACL rule itself, built up as permissions/restrictions written in the ACL Syntax.
    Name string
    A meaningful name for the rule. Must be unique.
    rule String
    The ACL rule itself, built up as permissions/restrictions written in the ACL Syntax.
    name String
    A meaningful name for the rule. Must be unique.
    rule string
    The ACL rule itself, built up as permissions/restrictions written in the ACL Syntax.
    name string
    A meaningful name for the rule. Must be unique.
    rule str
    The ACL rule itself, built up as permissions/restrictions written in the ACL Syntax.
    name str
    A meaningful name for the rule. Must be unique.
    rule String
    The ACL rule itself, built up as permissions/restrictions written in the ACL Syntax.
    name String
    A meaningful name for the rule. Must be unique.

    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,
            name: Optional[str] = None,
            rule: 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:
    Name string
    A meaningful name for the rule. Must be unique.
    Rule string
    The ACL rule itself, built up as permissions/restrictions written in the ACL Syntax.
    Name string
    A meaningful name for the rule. Must be unique.
    Rule string
    The ACL rule itself, built up as permissions/restrictions written in the ACL Syntax.
    name String
    A meaningful name for the rule. Must be unique.
    rule String
    The ACL rule itself, built up as permissions/restrictions written in the ACL Syntax.
    name string
    A meaningful name for the rule. Must be unique.
    rule string
    The ACL rule itself, built up as permissions/restrictions written in the ACL Syntax.
    name str
    A meaningful name for the rule. Must be unique.
    rule str
    The ACL rule itself, built up as permissions/restrictions written in the ACL Syntax.
    name String
    A meaningful name for the rule. Must be unique.
    rule String
    The ACL rule itself, built up as permissions/restrictions written in the ACL Syntax.

    Import

    rediscloud_acl_rule can be imported using the Identifier of the Rule, e.g.

     $ pulumi import rediscloud:index/aclRule:AclRule rule-resource 123456
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    rediscloud RedisLabs/pulumi-rediscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the rediscloud Terraform Provider.
    rediscloud logo
    Redis Cloud v1.3.5 published on Wednesday, Dec 20, 2023 by RedisLabs