We recommend using Azure Native.
published on Monday, Feb 23, 2026 by Pulumi
We recommend using Azure Native.
published on Monday, Feb 23, 2026 by Pulumi
Use this data source to access information about an existing Managed Redis Access Policy Assignment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.managedredis.getAccessPolicyAssignment({
objectId: "00000000-0000-0000-0000-000000000000",
managedRedisName: "example-managedredis",
resourceGroupName: "example-resources",
});
export const objectId = example.then(example => example.objectId);
import pulumi
import pulumi_azure as azure
example = azure.managedredis.get_access_policy_assignment(object_id="00000000-0000-0000-0000-000000000000",
managed_redis_name="example-managedredis",
resource_group_name="example-resources")
pulumi.export("objectId", example.object_id)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/managedredis"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := managedredis.LookupAccessPolicyAssignment(ctx, &managedredis.LookupAccessPolicyAssignmentArgs{
ObjectId: "00000000-0000-0000-0000-000000000000",
ManagedRedisName: "example-managedredis",
ResourceGroupName: "example-resources",
}, nil)
if err != nil {
return err
}
ctx.Export("objectId", example.ObjectId)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.ManagedRedis.GetAccessPolicyAssignment.Invoke(new()
{
ObjectId = "00000000-0000-0000-0000-000000000000",
ManagedRedisName = "example-managedredis",
ResourceGroupName = "example-resources",
});
return new Dictionary<string, object?>
{
["objectId"] = example.Apply(getAccessPolicyAssignmentResult => getAccessPolicyAssignmentResult.ObjectId),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.managedredis.ManagedredisFunctions;
import com.pulumi.azure.managedredis.inputs.GetAccessPolicyAssignmentArgs;
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 = ManagedredisFunctions.getAccessPolicyAssignment(GetAccessPolicyAssignmentArgs.builder()
.objectId("00000000-0000-0000-0000-000000000000")
.managedRedisName("example-managedredis")
.resourceGroupName("example-resources")
.build());
ctx.export("objectId", example.objectId());
}
}
variables:
example:
fn::invoke:
function: azure:managedredis:getAccessPolicyAssignment
arguments:
objectId: 00000000-0000-0000-0000-000000000000
managedRedisName: example-managedredis
resourceGroupName: example-resources
outputs:
objectId: ${example.objectId}
API Providers
This data source uses the following Azure API Providers:
Microsoft.Cache- 2025-07-01
Using getAccessPolicyAssignment
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 getAccessPolicyAssignment(args: GetAccessPolicyAssignmentArgs, opts?: InvokeOptions): Promise<GetAccessPolicyAssignmentResult>
function getAccessPolicyAssignmentOutput(args: GetAccessPolicyAssignmentOutputArgs, opts?: InvokeOptions): Output<GetAccessPolicyAssignmentResult>def get_access_policy_assignment(managed_redis_name: Optional[str] = None,
object_id: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAccessPolicyAssignmentResult
def get_access_policy_assignment_output(managed_redis_name: Optional[pulumi.Input[str]] = None,
object_id: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAccessPolicyAssignmentResult]func LookupAccessPolicyAssignment(ctx *Context, args *LookupAccessPolicyAssignmentArgs, opts ...InvokeOption) (*LookupAccessPolicyAssignmentResult, error)
func LookupAccessPolicyAssignmentOutput(ctx *Context, args *LookupAccessPolicyAssignmentOutputArgs, opts ...InvokeOption) LookupAccessPolicyAssignmentResultOutput> Note: This function is named LookupAccessPolicyAssignment in the Go SDK.
public static class GetAccessPolicyAssignment
{
public static Task<GetAccessPolicyAssignmentResult> InvokeAsync(GetAccessPolicyAssignmentArgs args, InvokeOptions? opts = null)
public static Output<GetAccessPolicyAssignmentResult> Invoke(GetAccessPolicyAssignmentInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAccessPolicyAssignmentResult> getAccessPolicyAssignment(GetAccessPolicyAssignmentArgs args, InvokeOptions options)
public static Output<GetAccessPolicyAssignmentResult> getAccessPolicyAssignment(GetAccessPolicyAssignmentArgs args, InvokeOptions options)
fn::invoke:
function: azure:managedredis/getAccessPolicyAssignment:getAccessPolicyAssignment
arguments:
# arguments dictionaryThe following arguments are supported:
- Managed
Redis stringName - The name of the Managed Redis instance.
- Object
Id string - The object ID of the Azure Active Directory user, group, service principal, or managed identity.
- Resource
Group stringName The name of the Resource Group where the Managed Redis instance exists.
Note: This data source retrieves Access Policy Assignments from the
defaultdatabase of the Managed Redis instance.
- Managed
Redis stringName - The name of the Managed Redis instance.
- Object
Id string - The object ID of the Azure Active Directory user, group, service principal, or managed identity.
- Resource
Group stringName The name of the Resource Group where the Managed Redis instance exists.
Note: This data source retrieves Access Policy Assignments from the
defaultdatabase of the Managed Redis instance.
- managed
Redis StringName - The name of the Managed Redis instance.
- object
Id String - The object ID of the Azure Active Directory user, group, service principal, or managed identity.
- resource
Group StringName The name of the Resource Group where the Managed Redis instance exists.
Note: This data source retrieves Access Policy Assignments from the
defaultdatabase of the Managed Redis instance.
- managed
Redis stringName - The name of the Managed Redis instance.
- object
Id string - The object ID of the Azure Active Directory user, group, service principal, or managed identity.
- resource
Group stringName The name of the Resource Group where the Managed Redis instance exists.
Note: This data source retrieves Access Policy Assignments from the
defaultdatabase of the Managed Redis instance.
- managed_
redis_ strname - The name of the Managed Redis instance.
- object_
id str - The object ID of the Azure Active Directory user, group, service principal, or managed identity.
- resource_
group_ strname The name of the Resource Group where the Managed Redis instance exists.
Note: This data source retrieves Access Policy Assignments from the
defaultdatabase of the Managed Redis instance.
- managed
Redis StringName - The name of the Managed Redis instance.
- object
Id String - The object ID of the Azure Active Directory user, group, service principal, or managed identity.
- resource
Group StringName The name of the Resource Group where the Managed Redis instance exists.
Note: This data source retrieves Access Policy Assignments from the
defaultdatabase of the Managed Redis instance.
getAccessPolicyAssignment Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Managed
Redis stringName - Object
Id string - Resource
Group stringName
- Id string
- The provider-assigned unique ID for this managed resource.
- Managed
Redis stringName - Object
Id string - Resource
Group stringName
- id String
- The provider-assigned unique ID for this managed resource.
- managed
Redis StringName - object
Id String - resource
Group StringName
- id string
- The provider-assigned unique ID for this managed resource.
- managed
Redis stringName - object
Id string - resource
Group stringName
- id str
- The provider-assigned unique ID for this managed resource.
- managed_
redis_ strname - object_
id str - resource_
group_ strname
- id String
- The provider-assigned unique ID for this managed resource.
- managed
Redis StringName - object
Id String - resource
Group StringName
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Feb 23, 2026 by Pulumi
