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

rediscloud.getAclRule

Explore with Pulumi AI

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

    The Rule (a.k.a Redis Rule, Redis ACL) data source allows access to an existing Rule within your Redis Enterprise Cloud Account.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Rediscloud = Pulumi.Rediscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Rediscloud.GetAclRule.Invoke(new()
        {
            Name = "cache-reader-rule",
        });
    
        return new Dictionary<string, object?>
        {
            ["rediscloudAclRule"] = example.Apply(getAclRuleResult => getAclRuleResult.Id),
        };
    });
    
    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 {
    		example, err := rediscloud.LookupAclRule(ctx, &rediscloud.LookupAclRuleArgs{
    			Name: "cache-reader-rule",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("rediscloudAclRule", example.Id)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.rediscloud.RediscloudFunctions;
    import com.pulumi.rediscloud.inputs.GetAclRuleArgs;
    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 example = RediscloudFunctions.getAclRule(GetAclRuleArgs.builder()
                .name("cache-reader-rule")
                .build());
    
            ctx.export("rediscloudAclRule", example.applyValue(getAclRuleResult -> getAclRuleResult.id()));
        }
    }
    
    import pulumi
    import pulumi_rediscloud as rediscloud
    
    example = rediscloud.get_acl_rule(name="cache-reader-rule")
    pulumi.export("rediscloudAclRule", example.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as rediscloud from "@pulumi/rediscloud";
    
    const example = rediscloud.getAclRule({
        name: "cache-reader-rule",
    });
    export const rediscloudAclRule = example.then(example => example.id);
    
    variables:
      example:
        fn::invoke:
          Function: rediscloud:getAclRule
          Arguments:
            name: cache-reader-rule
    outputs:
      rediscloudAclRule: ${example.id}
    

    Using getAclRule

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getAclRule(args: GetAclRuleArgs, opts?: InvokeOptions): Promise<GetAclRuleResult>
    function getAclRuleOutput(args: GetAclRuleOutputArgs, opts?: InvokeOptions): Output<GetAclRuleResult>
    def get_acl_rule(name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetAclRuleResult
    def get_acl_rule_output(name: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetAclRuleResult]
    func LookupAclRule(ctx *Context, args *LookupAclRuleArgs, opts ...InvokeOption) (*LookupAclRuleResult, error)
    func LookupAclRuleOutput(ctx *Context, args *LookupAclRuleOutputArgs, opts ...InvokeOption) LookupAclRuleResultOutput

    > Note: This function is named LookupAclRule in the Go SDK.

    public static class GetAclRule 
    {
        public static Task<GetAclRuleResult> InvokeAsync(GetAclRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetAclRuleResult> Invoke(GetAclRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAclRuleResult> getAclRule(GetAclRuleArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: rediscloud:index/getAclRule:getAclRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the Rule to filter returned subscriptions
    Name string
    The name of the Rule to filter returned subscriptions
    name String
    The name of the Rule to filter returned subscriptions
    name string
    The name of the Rule to filter returned subscriptions
    name str
    The name of the Rule to filter returned subscriptions
    name String
    The name of the Rule to filter returned subscriptions

    getAclRule Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The Rule's name.
    Rule string
    The ACL Rule itself.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The Rule's name.
    Rule string
    The ACL Rule itself.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The Rule's name.
    rule String
    The ACL Rule itself.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The Rule's name.
    rule string
    The ACL Rule itself.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The Rule's name.
    rule str
    The ACL Rule itself.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The Rule's name.
    rule String
    The ACL Rule itself.

    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