1. Packages
  2. Azure Classic
  3. API Docs
  4. managedredis
  5. AccessPolicyAssignment

We recommend using Azure Native.

Viewing docs for Azure v6.33.0
published on Monday, Feb 23, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v6.33.0
published on Monday, Feb 23, 2026 by Pulumi

    Manages a Managed Redis Access Policy Assignment.

    Create AccessPolicyAssignment Resource

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

    Constructor syntax

    new AccessPolicyAssignment(name: string, args: AccessPolicyAssignmentArgs, opts?: CustomResourceOptions);
    @overload
    def AccessPolicyAssignment(resource_name: str,
                               args: AccessPolicyAssignmentArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def AccessPolicyAssignment(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               managed_redis_id: Optional[str] = None,
                               object_id: Optional[str] = None)
    func NewAccessPolicyAssignment(ctx *Context, name string, args AccessPolicyAssignmentArgs, opts ...ResourceOption) (*AccessPolicyAssignment, error)
    public AccessPolicyAssignment(string name, AccessPolicyAssignmentArgs args, CustomResourceOptions? opts = null)
    public AccessPolicyAssignment(String name, AccessPolicyAssignmentArgs args)
    public AccessPolicyAssignment(String name, AccessPolicyAssignmentArgs args, CustomResourceOptions options)
    
    type: azure:managedredis:AccessPolicyAssignment
    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 AccessPolicyAssignmentArgs
    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 AccessPolicyAssignmentArgs
    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 AccessPolicyAssignmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AccessPolicyAssignmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AccessPolicyAssignmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var accessPolicyAssignmentResource = new Azure.ManagedRedis.AccessPolicyAssignment("accessPolicyAssignmentResource", new()
    {
        ManagedRedisId = "string",
        ObjectId = "string",
    });
    
    example, err := managedredis.NewAccessPolicyAssignment(ctx, "accessPolicyAssignmentResource", &managedredis.AccessPolicyAssignmentArgs{
    	ManagedRedisId: pulumi.String("string"),
    	ObjectId:       pulumi.String("string"),
    })
    
    var accessPolicyAssignmentResource = new AccessPolicyAssignment("accessPolicyAssignmentResource", AccessPolicyAssignmentArgs.builder()
        .managedRedisId("string")
        .objectId("string")
        .build());
    
    access_policy_assignment_resource = azure.managedredis.AccessPolicyAssignment("accessPolicyAssignmentResource",
        managed_redis_id="string",
        object_id="string")
    
    const accessPolicyAssignmentResource = new azure.managedredis.AccessPolicyAssignment("accessPolicyAssignmentResource", {
        managedRedisId: "string",
        objectId: "string",
    });
    
    type: azure:managedredis:AccessPolicyAssignment
    properties:
        managedRedisId: string
        objectId: string
    

    AccessPolicyAssignment Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The AccessPolicyAssignment resource accepts the following input properties:

    ManagedRedisId string
    The ID of the Managed Redis instance. Changing this forces a new Access Policy Assignment to be created.
    ObjectId string

    The object ID of the Azure Active Directory user, group, service principal, or managed identity to assign the access policy to. Changing this forces a new Access Policy Assignment to be created.

    Note: Access Policy Assignments are created on the default database of the Managed Redis instance.

    ManagedRedisId string
    The ID of the Managed Redis instance. Changing this forces a new Access Policy Assignment to be created.
    ObjectId string

    The object ID of the Azure Active Directory user, group, service principal, or managed identity to assign the access policy to. Changing this forces a new Access Policy Assignment to be created.

    Note: Access Policy Assignments are created on the default database of the Managed Redis instance.

    managedRedisId String
    The ID of the Managed Redis instance. Changing this forces a new Access Policy Assignment to be created.
    objectId String

    The object ID of the Azure Active Directory user, group, service principal, or managed identity to assign the access policy to. Changing this forces a new Access Policy Assignment to be created.

    Note: Access Policy Assignments are created on the default database of the Managed Redis instance.

    managedRedisId string
    The ID of the Managed Redis instance. Changing this forces a new Access Policy Assignment to be created.
    objectId string

    The object ID of the Azure Active Directory user, group, service principal, or managed identity to assign the access policy to. Changing this forces a new Access Policy Assignment to be created.

    Note: Access Policy Assignments are created on the default database of the Managed Redis instance.

    managed_redis_id str
    The ID of the Managed Redis instance. Changing this forces a new Access Policy Assignment to be created.
    object_id str

    The object ID of the Azure Active Directory user, group, service principal, or managed identity to assign the access policy to. Changing this forces a new Access Policy Assignment to be created.

    Note: Access Policy Assignments are created on the default database of the Managed Redis instance.

    managedRedisId String
    The ID of the Managed Redis instance. Changing this forces a new Access Policy Assignment to be created.
    objectId String

    The object ID of the Azure Active Directory user, group, service principal, or managed identity to assign the access policy to. Changing this forces a new Access Policy Assignment to be created.

    Note: Access Policy Assignments are created on the default database of the Managed Redis instance.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AccessPolicyAssignment 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 AccessPolicyAssignment Resource

    Get an existing AccessPolicyAssignment 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?: AccessPolicyAssignmentState, opts?: CustomResourceOptions): AccessPolicyAssignment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            managed_redis_id: Optional[str] = None,
            object_id: Optional[str] = None) -> AccessPolicyAssignment
    func GetAccessPolicyAssignment(ctx *Context, name string, id IDInput, state *AccessPolicyAssignmentState, opts ...ResourceOption) (*AccessPolicyAssignment, error)
    public static AccessPolicyAssignment Get(string name, Input<string> id, AccessPolicyAssignmentState? state, CustomResourceOptions? opts = null)
    public static AccessPolicyAssignment get(String name, Output<String> id, AccessPolicyAssignmentState state, CustomResourceOptions options)
    resources:  _:    type: azure:managedredis:AccessPolicyAssignment    get:      id: ${id}
    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:
    ManagedRedisId string
    The ID of the Managed Redis instance. Changing this forces a new Access Policy Assignment to be created.
    ObjectId string

    The object ID of the Azure Active Directory user, group, service principal, or managed identity to assign the access policy to. Changing this forces a new Access Policy Assignment to be created.

    Note: Access Policy Assignments are created on the default database of the Managed Redis instance.

    ManagedRedisId string
    The ID of the Managed Redis instance. Changing this forces a new Access Policy Assignment to be created.
    ObjectId string

    The object ID of the Azure Active Directory user, group, service principal, or managed identity to assign the access policy to. Changing this forces a new Access Policy Assignment to be created.

    Note: Access Policy Assignments are created on the default database of the Managed Redis instance.

    managedRedisId String
    The ID of the Managed Redis instance. Changing this forces a new Access Policy Assignment to be created.
    objectId String

    The object ID of the Azure Active Directory user, group, service principal, or managed identity to assign the access policy to. Changing this forces a new Access Policy Assignment to be created.

    Note: Access Policy Assignments are created on the default database of the Managed Redis instance.

    managedRedisId string
    The ID of the Managed Redis instance. Changing this forces a new Access Policy Assignment to be created.
    objectId string

    The object ID of the Azure Active Directory user, group, service principal, or managed identity to assign the access policy to. Changing this forces a new Access Policy Assignment to be created.

    Note: Access Policy Assignments are created on the default database of the Managed Redis instance.

    managed_redis_id str
    The ID of the Managed Redis instance. Changing this forces a new Access Policy Assignment to be created.
    object_id str

    The object ID of the Azure Active Directory user, group, service principal, or managed identity to assign the access policy to. Changing this forces a new Access Policy Assignment to be created.

    Note: Access Policy Assignments are created on the default database of the Managed Redis instance.

    managedRedisId String
    The ID of the Managed Redis instance. Changing this forces a new Access Policy Assignment to be created.
    objectId String

    The object ID of the Azure Active Directory user, group, service principal, or managed identity to assign the access policy to. Changing this forces a new Access Policy Assignment to be created.

    Note: Access Policy Assignments are created on the default database of the Managed Redis instance.

    Import

    Managed Redis Access Policy Assignments can be imported using the resource id, e.g.

    $ pulumi import azure:managedredis/accessPolicyAssignment:AccessPolicyAssignment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/redisEnterprise/redis1/databases/default/accessPolicyAssignments/00000000-0000-0000-0000-000000000000
    

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

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v6.33.0
    published on Monday, Feb 23, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.