azure-native.redisenterprise.AccessPolicyAssignment
Explore with Pulumi AI
Describes the access policy assignment of Redis Enterprise database
Uses Azure REST API version 2024-09-01-preview.
Other available API versions: 2025-04-01, 2025-05-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native redisenterprise [ApiVersion]
. See the version guide for details.
Example Usage
RedisEnterpriseAccessPolicyAssignmentCreateUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var accessPolicyAssignment = new AzureNative.RedisEnterprise.AccessPolicyAssignment("accessPolicyAssignment", new()
{
AccessPolicyAssignmentName = "defaultTestEntraApp1",
AccessPolicyName = "default",
ClusterName = "cache1",
DatabaseName = "default",
ResourceGroupName = "rg1",
User = new AzureNative.RedisEnterprise.Inputs.AccessPolicyAssignmentPropertiesUserArgs
{
ObjectId = "6497c918-11ad-41e7-1b0f-7c518a87d0b0",
},
});
});
package main
import (
redisenterprise "github.com/pulumi/pulumi-azure-native-sdk/redisenterprise/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := redisenterprise.NewAccessPolicyAssignment(ctx, "accessPolicyAssignment", &redisenterprise.AccessPolicyAssignmentArgs{
AccessPolicyAssignmentName: pulumi.String("defaultTestEntraApp1"),
AccessPolicyName: pulumi.String("default"),
ClusterName: pulumi.String("cache1"),
DatabaseName: pulumi.String("default"),
ResourceGroupName: pulumi.String("rg1"),
User: &redisenterprise.AccessPolicyAssignmentPropertiesUserArgs{
ObjectId: pulumi.String("6497c918-11ad-41e7-1b0f-7c518a87d0b0"),
},
})
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.azurenative.redisenterprise.AccessPolicyAssignment;
import com.pulumi.azurenative.redisenterprise.AccessPolicyAssignmentArgs;
import com.pulumi.azurenative.redisenterprise.inputs.AccessPolicyAssignmentPropertiesUserArgs;
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 accessPolicyAssignment = new AccessPolicyAssignment("accessPolicyAssignment", AccessPolicyAssignmentArgs.builder()
.accessPolicyAssignmentName("defaultTestEntraApp1")
.accessPolicyName("default")
.clusterName("cache1")
.databaseName("default")
.resourceGroupName("rg1")
.user(AccessPolicyAssignmentPropertiesUserArgs.builder()
.objectId("6497c918-11ad-41e7-1b0f-7c518a87d0b0")
.build())
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const accessPolicyAssignment = new azure_native.redisenterprise.AccessPolicyAssignment("accessPolicyAssignment", {
accessPolicyAssignmentName: "defaultTestEntraApp1",
accessPolicyName: "default",
clusterName: "cache1",
databaseName: "default",
resourceGroupName: "rg1",
user: {
objectId: "6497c918-11ad-41e7-1b0f-7c518a87d0b0",
},
});
import pulumi
import pulumi_azure_native as azure_native
access_policy_assignment = azure_native.redisenterprise.AccessPolicyAssignment("accessPolicyAssignment",
access_policy_assignment_name="defaultTestEntraApp1",
access_policy_name="default",
cluster_name="cache1",
database_name="default",
resource_group_name="rg1",
user={
"object_id": "6497c918-11ad-41e7-1b0f-7c518a87d0b0",
})
resources:
accessPolicyAssignment:
type: azure-native:redisenterprise:AccessPolicyAssignment
properties:
accessPolicyAssignmentName: defaultTestEntraApp1
accessPolicyName: default
clusterName: cache1
databaseName: default
resourceGroupName: rg1
user:
objectId: 6497c918-11ad-41e7-1b0f-7c518a87d0b0
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,
access_policy_name: Optional[str] = None,
cluster_name: Optional[str] = None,
database_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
user: Optional[AccessPolicyAssignmentPropertiesUserArgs] = None,
access_policy_assignment_name: 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-native:redisenterprise: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 azure_nativeAccessPolicyAssignmentResource = new AzureNative.RedisEnterprise.AccessPolicyAssignment("azure-nativeAccessPolicyAssignmentResource", new()
{
AccessPolicyName = "string",
ClusterName = "string",
DatabaseName = "string",
ResourceGroupName = "string",
User = new AzureNative.RedisEnterprise.Inputs.AccessPolicyAssignmentPropertiesUserArgs
{
ObjectId = "string",
},
AccessPolicyAssignmentName = "string",
});
example, err := redisenterprise.NewAccessPolicyAssignment(ctx, "azure-nativeAccessPolicyAssignmentResource", &redisenterprise.AccessPolicyAssignmentArgs{
AccessPolicyName: pulumi.String("string"),
ClusterName: pulumi.String("string"),
DatabaseName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
User: &redisenterprise.AccessPolicyAssignmentPropertiesUserArgs{
ObjectId: pulumi.String("string"),
},
AccessPolicyAssignmentName: pulumi.String("string"),
})
var azure_nativeAccessPolicyAssignmentResource = new com.pulumi.azurenative.redisenterprise.AccessPolicyAssignment("azure-nativeAccessPolicyAssignmentResource", com.pulumi.azurenative.redisenterprise.AccessPolicyAssignmentArgs.builder()
.accessPolicyName("string")
.clusterName("string")
.databaseName("string")
.resourceGroupName("string")
.user(AccessPolicyAssignmentPropertiesUserArgs.builder()
.objectId("string")
.build())
.accessPolicyAssignmentName("string")
.build());
azure_native_access_policy_assignment_resource = azure_native.redisenterprise.AccessPolicyAssignment("azure-nativeAccessPolicyAssignmentResource",
access_policy_name="string",
cluster_name="string",
database_name="string",
resource_group_name="string",
user={
"object_id": "string",
},
access_policy_assignment_name="string")
const azure_nativeAccessPolicyAssignmentResource = new azure_native.redisenterprise.AccessPolicyAssignment("azure-nativeAccessPolicyAssignmentResource", {
accessPolicyName: "string",
clusterName: "string",
databaseName: "string",
resourceGroupName: "string",
user: {
objectId: "string",
},
accessPolicyAssignmentName: "string",
});
type: azure-native:redisenterprise:AccessPolicyAssignment
properties:
accessPolicyAssignmentName: string
accessPolicyName: string
clusterName: string
databaseName: string
resourceGroupName: string
user:
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:
- Access
Policy stringName - Name of access policy under specific access policy assignment. Only "default" policy is supported for now.
- Cluster
Name string - The name of the Redis Enterprise cluster.
- Database
Name string - The name of the Redis Enterprise database.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- User
Pulumi.
Azure Native. Redis Enterprise. Inputs. Access Policy Assignment Properties User - The user associated with the access policy.
- Access
Policy stringAssignment Name - The name of the Redis Enterprise database access policy assignment.
- Access
Policy stringName - Name of access policy under specific access policy assignment. Only "default" policy is supported for now.
- Cluster
Name string - The name of the Redis Enterprise cluster.
- Database
Name string - The name of the Redis Enterprise database.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- User
Access
Policy Assignment Properties User Args - The user associated with the access policy.
- Access
Policy stringAssignment Name - The name of the Redis Enterprise database access policy assignment.
- access
Policy StringName - Name of access policy under specific access policy assignment. Only "default" policy is supported for now.
- cluster
Name String - The name of the Redis Enterprise cluster.
- database
Name String - The name of the Redis Enterprise database.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- user
Access
Policy Assignment Properties User - The user associated with the access policy.
- access
Policy StringAssignment Name - The name of the Redis Enterprise database access policy assignment.
- access
Policy stringName - Name of access policy under specific access policy assignment. Only "default" policy is supported for now.
- cluster
Name string - The name of the Redis Enterprise cluster.
- database
Name string - The name of the Redis Enterprise database.
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- user
Access
Policy Assignment Properties User - The user associated with the access policy.
- access
Policy stringAssignment Name - The name of the Redis Enterprise database access policy assignment.
- access_
policy_ strname - Name of access policy under specific access policy assignment. Only "default" policy is supported for now.
- cluster_
name str - The name of the Redis Enterprise cluster.
- database_
name str - The name of the Redis Enterprise database.
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- user
Access
Policy Assignment Properties User Args - The user associated with the access policy.
- access_
policy_ strassignment_ name - The name of the Redis Enterprise database access policy assignment.
- access
Policy StringName - Name of access policy under specific access policy assignment. Only "default" policy is supported for now.
- cluster
Name String - The name of the Redis Enterprise cluster.
- database
Name String - The name of the Redis Enterprise database.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- user Property Map
- The user associated with the access policy.
- access
Policy StringAssignment Name - The name of the Redis Enterprise database access policy assignment.
Outputs
All input properties are implicitly available as output properties. Additionally, the AccessPolicyAssignment resource produces the following output properties:
- Azure
Api stringVersion - The Azure API version of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- Provisioning
State string - Current provisioning status of the access policy assignment.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- Azure
Api stringVersion - The Azure API version of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- Provisioning
State string - Current provisioning status of the access policy assignment.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure
Api StringVersion - The Azure API version of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- provisioning
State String - Current provisioning status of the access policy assignment.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure
Api stringVersion - The Azure API version of the resource.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the resource
- provisioning
State string - Current provisioning status of the access policy assignment.
- type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure_
api_ strversion - The Azure API version of the resource.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the resource
- provisioning_
state str - Current provisioning status of the access policy assignment.
- type str
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure
Api StringVersion - The Azure API version of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- provisioning
State String - Current provisioning status of the access policy assignment.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Supporting Types
AccessPolicyAssignmentPropertiesResponseUser, AccessPolicyAssignmentPropertiesResponseUserArgs
- Object
Id string - The object ID of the user.
- Object
Id string - The object ID of the user.
- object
Id String - The object ID of the user.
- object
Id string - The object ID of the user.
- object_
id str - The object ID of the user.
- object
Id String - The object ID of the user.
AccessPolicyAssignmentPropertiesUser, AccessPolicyAssignmentPropertiesUserArgs
- Object
Id string - The object ID of the user.
- Object
Id string - The object ID of the user.
- object
Id String - The object ID of the user.
- object
Id string - The object ID of the user.
- object_
id str - The object ID of the user.
- object
Id String - The object ID of the user.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:redisenterprise:AccessPolicyAssignment defaultTestEntraApp1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/accessPolicyAssignments/{accessPolicyAssignmentName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0