import * as pulumi from "@pulumi/pulumi"; /** * Manages a Redis Cache Access Policy Assignment * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const test = azure.core.getClientConfig({}); * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "East US", * }); * const exampleCache = new azure.redis.Cache("example", { * name: "example", * location: example.location, * resourceGroupName: example.name, * capacity: 1, * family: "P", * skuName: "Premium", * enableNonSslPort: false, * redisConfiguration: { * maxmemoryReserved: 2, * maxmemoryDelta: 2, * maxmemoryPolicy: "allkeys-lru", * }, * }); * const exampleCacheAccessPolicyAssignment = new azure.redis.CacheAccessPolicyAssignment("example", { * name: "example", * redisCacheId: exampleCache.id, * accessPolicyName: "Data Contributor", * objectId: test.then(test => test.objectId), * objectIdAlias: "ServicePrincipal", * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Cache` - 2024-11-01 * * ## Import * * Redis Cache Policy Assignment can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:redis/cacheAccessPolicyAssignment:CacheAccessPolicyAssignment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/redis/cache1/accessPolicyAssignments/assignment1 * ``` */ export declare class CacheAccessPolicyAssignment extends pulumi.CustomResource { /** * Get an existing CacheAccessPolicyAssignment resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: CacheAccessPolicyAssignmentState, opts?: pulumi.CustomResourceOptions): CacheAccessPolicyAssignment; /** * Returns true if the given object is an instance of CacheAccessPolicyAssignment. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is CacheAccessPolicyAssignment; /** * The name of the Access Policy to be assigned. Changing this forces a new Redis Cache Access Policy Assignment to be created. */ readonly accessPolicyName: pulumi.Output; /** * The name of the Redis Cache Access Policy Assignment. Changing this forces a new Redis Cache Access Policy Assignment to be created. */ readonly name: pulumi.Output; /** * The principal ID to be assigned the Access Policy. Changing this forces a new Redis Cache Access Policy Assignment to be created. */ readonly objectId: pulumi.Output; /** * The alias of the principal ID. User-friendly name for object ID. Also represents username for token based authentication. Changing this forces a new Redis Cache Access Policy Assignment to be created. */ readonly objectIdAlias: pulumi.Output; /** * The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy Assignment to be created. */ readonly redisCacheId: pulumi.Output; /** * Create a CacheAccessPolicyAssignment resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: CacheAccessPolicyAssignmentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CacheAccessPolicyAssignment resources. */ export interface CacheAccessPolicyAssignmentState { /** * The name of the Access Policy to be assigned. Changing this forces a new Redis Cache Access Policy Assignment to be created. */ accessPolicyName?: pulumi.Input; /** * The name of the Redis Cache Access Policy Assignment. Changing this forces a new Redis Cache Access Policy Assignment to be created. */ name?: pulumi.Input; /** * The principal ID to be assigned the Access Policy. Changing this forces a new Redis Cache Access Policy Assignment to be created. */ objectId?: pulumi.Input; /** * The alias of the principal ID. User-friendly name for object ID. Also represents username for token based authentication. Changing this forces a new Redis Cache Access Policy Assignment to be created. */ objectIdAlias?: pulumi.Input; /** * The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy Assignment to be created. */ redisCacheId?: pulumi.Input; } /** * The set of arguments for constructing a CacheAccessPolicyAssignment resource. */ export interface CacheAccessPolicyAssignmentArgs { /** * The name of the Access Policy to be assigned. Changing this forces a new Redis Cache Access Policy Assignment to be created. */ accessPolicyName: pulumi.Input; /** * The name of the Redis Cache Access Policy Assignment. Changing this forces a new Redis Cache Access Policy Assignment to be created. */ name?: pulumi.Input; /** * The principal ID to be assigned the Access Policy. Changing this forces a new Redis Cache Access Policy Assignment to be created. */ objectId: pulumi.Input; /** * The alias of the principal ID. User-friendly name for object ID. Also represents username for token based authentication. Changing this forces a new Redis Cache Access Policy Assignment to be created. */ objectIdAlias: pulumi.Input; /** * The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy Assignment to be created. */ redisCacheId: pulumi.Input; }