We recommend using Azure Native.
azure.redis.CacheAccessPolicy
Explore with Pulumi AI
Manages a Redis Cache Access Policy
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: East US
exampleCache:
type: azure:redis:Cache
name: example
properties:
name: example
location: ${example.location}
resourceGroupName: ${example.name}
capacity: 1
family: P
skuName: Premium
enableNonSslPort: false
redisConfiguration:
maxmemoryReserved: 2
maxmemoryDelta: 2
maxmemoryPolicy: allkeys-lru
exampleCacheAccessPolicy:
type: azure:redis:CacheAccessPolicy
name: example
properties:
name: example
redisCacheId: ${exampleCache.id}
permissions: +@read +@connection +cluster|info
Create CacheAccessPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CacheAccessPolicy(name: string, args: CacheAccessPolicyArgs, opts?: CustomResourceOptions);
@overload
def CacheAccessPolicy(resource_name: str,
args: CacheAccessPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CacheAccessPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
permissions: Optional[str] = None,
redis_cache_id: Optional[str] = None,
name: Optional[str] = None)
func NewCacheAccessPolicy(ctx *Context, name string, args CacheAccessPolicyArgs, opts ...ResourceOption) (*CacheAccessPolicy, error)
public CacheAccessPolicy(string name, CacheAccessPolicyArgs args, CustomResourceOptions? opts = null)
public CacheAccessPolicy(String name, CacheAccessPolicyArgs args)
public CacheAccessPolicy(String name, CacheAccessPolicyArgs args, CustomResourceOptions options)
type: azure:redis:CacheAccessPolicy
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 CacheAccessPolicyArgs
- 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 CacheAccessPolicyArgs
- 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 CacheAccessPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CacheAccessPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CacheAccessPolicyArgs
- 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 azureCacheAccessPolicyResource = new Azure.Redis.CacheAccessPolicy("azureCacheAccessPolicyResource", new()
{
Permissions = "string",
RedisCacheId = "string",
Name = "string",
});
example, err := redis.NewCacheAccessPolicy(ctx, "azureCacheAccessPolicyResource", &redis.CacheAccessPolicyArgs{
Permissions: pulumi.String("string"),
RedisCacheId: pulumi.String("string"),
Name: pulumi.String("string"),
})
var azureCacheAccessPolicyResource = new CacheAccessPolicy("azureCacheAccessPolicyResource", CacheAccessPolicyArgs.builder()
.permissions("string")
.redisCacheId("string")
.name("string")
.build());
azure_cache_access_policy_resource = azure.redis.CacheAccessPolicy("azureCacheAccessPolicyResource",
permissions="string",
redis_cache_id="string",
name="string")
const azureCacheAccessPolicyResource = new azure.redis.CacheAccessPolicy("azureCacheAccessPolicyResource", {
permissions: "string",
redisCacheId: "string",
name: "string",
});
type: azure:redis:CacheAccessPolicy
properties:
name: string
permissions: string
redisCacheId: string
CacheAccessPolicy 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 CacheAccessPolicy resource accepts the following input properties:
- Permissions string
- Permissions that are going to be assigned to this Redis Cache Access Policy.
- Redis
Cache stringId - The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy to be created.
- Name string
- The name of the Redis Cache Access Policy. Changing this forces a new Redis Cache Access Policy to be created.
- Permissions string
- Permissions that are going to be assigned to this Redis Cache Access Policy.
- Redis
Cache stringId - The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy to be created.
- Name string
- The name of the Redis Cache Access Policy. Changing this forces a new Redis Cache Access Policy to be created.
- permissions String
- Permissions that are going to be assigned to this Redis Cache Access Policy.
- redis
Cache StringId - The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy to be created.
- name String
- The name of the Redis Cache Access Policy. Changing this forces a new Redis Cache Access Policy to be created.
- permissions string
- Permissions that are going to be assigned to this Redis Cache Access Policy.
- redis
Cache stringId - The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy to be created.
- name string
- The name of the Redis Cache Access Policy. Changing this forces a new Redis Cache Access Policy to be created.
- permissions str
- Permissions that are going to be assigned to this Redis Cache Access Policy.
- redis_
cache_ strid - The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy to be created.
- name str
- The name of the Redis Cache Access Policy. Changing this forces a new Redis Cache Access Policy to be created.
- permissions String
- Permissions that are going to be assigned to this Redis Cache Access Policy.
- redis
Cache StringId - The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy to be created.
- name String
- The name of the Redis Cache Access Policy. Changing this forces a new Redis Cache Access Policy to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the CacheAccessPolicy 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 CacheAccessPolicy Resource
Get an existing CacheAccessPolicy 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?: CacheAccessPolicyState, opts?: CustomResourceOptions): CacheAccessPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
permissions: Optional[str] = None,
redis_cache_id: Optional[str] = None) -> CacheAccessPolicy
func GetCacheAccessPolicy(ctx *Context, name string, id IDInput, state *CacheAccessPolicyState, opts ...ResourceOption) (*CacheAccessPolicy, error)
public static CacheAccessPolicy Get(string name, Input<string> id, CacheAccessPolicyState? state, CustomResourceOptions? opts = null)
public static CacheAccessPolicy get(String name, Output<String> id, CacheAccessPolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Name string
- The name of the Redis Cache Access Policy. Changing this forces a new Redis Cache Access Policy to be created.
- Permissions string
- Permissions that are going to be assigned to this Redis Cache Access Policy.
- Redis
Cache stringId - The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy to be created.
- Name string
- The name of the Redis Cache Access Policy. Changing this forces a new Redis Cache Access Policy to be created.
- Permissions string
- Permissions that are going to be assigned to this Redis Cache Access Policy.
- Redis
Cache stringId - The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy to be created.
- name String
- The name of the Redis Cache Access Policy. Changing this forces a new Redis Cache Access Policy to be created.
- permissions String
- Permissions that are going to be assigned to this Redis Cache Access Policy.
- redis
Cache StringId - The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy to be created.
- name string
- The name of the Redis Cache Access Policy. Changing this forces a new Redis Cache Access Policy to be created.
- permissions string
- Permissions that are going to be assigned to this Redis Cache Access Policy.
- redis
Cache stringId - The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy to be created.
- name str
- The name of the Redis Cache Access Policy. Changing this forces a new Redis Cache Access Policy to be created.
- permissions str
- Permissions that are going to be assigned to this Redis Cache Access Policy.
- redis_
cache_ strid - The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy to be created.
- name String
- The name of the Redis Cache Access Policy. Changing this forces a new Redis Cache Access Policy to be created.
- permissions String
- Permissions that are going to be assigned to this Redis Cache Access Policy.
- redis
Cache StringId - The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy to be created.
Import
Redis Cache Access Policy can be imported using the resource id
, e.g.
$ pulumi import azure:redis/cacheAccessPolicy:CacheAccessPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/redis/cache1/accessPolicies/policy1
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.