azure-native-v2.cache.AccessPolicy
Explore with Pulumi AI
Response to get/put access policy. Azure REST API version: 2023-05-01-preview.
Other available API versions: 2023-08-01, 2024-03-01, 2024-04-01-preview, 2024-11-01.
Create AccessPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AccessPolicy(name: string, args: AccessPolicyArgs, opts?: CustomResourceOptions);
@overload
def AccessPolicy(resource_name: str,
args: AccessPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AccessPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
cache_name: Optional[str] = None,
permissions: Optional[str] = None,
resource_group_name: Optional[str] = None,
access_policy_name: Optional[str] = None)
func NewAccessPolicy(ctx *Context, name string, args AccessPolicyArgs, opts ...ResourceOption) (*AccessPolicy, error)
public AccessPolicy(string name, AccessPolicyArgs args, CustomResourceOptions? opts = null)
public AccessPolicy(String name, AccessPolicyArgs args)
public AccessPolicy(String name, AccessPolicyArgs args, CustomResourceOptions options)
type: azure-native:cache:AccessPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. AccessPolicyArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. AccessPolicyArgs - The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. AccessPolicyArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. AccessPolicyArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. AccessPolicyArgs - 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 accessPolicyResource = new AzureNative.Cache.AccessPolicy("accessPolicyResource", new()
{
CacheName = "string",
Permissions = "string",
ResourceGroupName = "string",
AccessPolicyName = "string",
});
example, err := cache.NewAccessPolicy(ctx, "accessPolicyResource", &cache.AccessPolicyArgs{
CacheName: "string",
Permissions: "string",
ResourceGroupName: "string",
AccessPolicyName: "string",
})
var accessPolicyResource = new AccessPolicy("accessPolicyResource", AccessPolicyArgs.builder()
.cacheName("string")
.permissions("string")
.resourceGroupName("string")
.accessPolicyName("string")
.build());
access_policy_resource = azure_native.cache.AccessPolicy("accessPolicyResource",
cache_name=string,
permissions=string,
resource_group_name=string,
access_policy_name=string)
const accessPolicyResource = new azure_native.cache.AccessPolicy("accessPolicyResource", {
cacheName: "string",
permissions: "string",
resourceGroupName: "string",
accessPolicyName: "string",
});
type: azure-native:cache:AccessPolicy
properties:
accessPolicyName: string
cacheName: string
permissions: string
resourceGroupName: string
AccessPolicy 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 AccessPolicy resource accepts the following input properties:
- Cache
Name This property is required. Changes to this property will trigger replacement.
- The name of the Redis cache.
- Permissions
This property is required. string - Permissions for the access policy. Learn how to configure permissions at https://aka.ms/redis/AADPreRequisites
- Resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group. The name is case insensitive.
- Access
Policy Name Changes to this property will trigger replacement.
- The name of the access policy that is being added to the Redis cache.
- Cache
Name This property is required. Changes to this property will trigger replacement.
- The name of the Redis cache.
- Permissions
This property is required. string - Permissions for the access policy. Learn how to configure permissions at https://aka.ms/redis/AADPreRequisites
- Resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group. The name is case insensitive.
- Access
Policy Name Changes to this property will trigger replacement.
- The name of the access policy that is being added to the Redis cache.
- cache
Name This property is required. Changes to this property will trigger replacement.
- The name of the Redis cache.
- permissions
This property is required. String - Permissions for the access policy. Learn how to configure permissions at https://aka.ms/redis/AADPreRequisites
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group. The name is case insensitive.
- access
Policy Name Changes to this property will trigger replacement.
- The name of the access policy that is being added to the Redis cache.
- cache
Name This property is required. Changes to this property will trigger replacement.
- The name of the Redis cache.
- permissions
This property is required. string - Permissions for the access policy. Learn how to configure permissions at https://aka.ms/redis/AADPreRequisites
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group. The name is case insensitive.
- access
Policy Name Changes to this property will trigger replacement.
- The name of the access policy that is being added to the Redis cache.
- cache_
name This property is required. Changes to this property will trigger replacement.
- The name of the Redis cache.
- permissions
This property is required. str - Permissions for the access policy. Learn how to configure permissions at https://aka.ms/redis/AADPreRequisites
- resource_
group_ name This property is required. Changes to this property will trigger replacement.
- The name of the resource group. The name is case insensitive.
- access_
policy_ name Changes to this property will trigger replacement.
- The name of the access policy that is being added to the Redis cache.
- cache
Name This property is required. Changes to this property will trigger replacement.
- The name of the Redis cache.
- permissions
This property is required. String - Permissions for the access policy. Learn how to configure permissions at https://aka.ms/redis/AADPreRequisites
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group. The name is case insensitive.
- access
Policy Name Changes to this property will trigger replacement.
- The name of the access policy that is being added to the Redis cache.
Outputs
All input properties are implicitly available as output properties. Additionally, the AccessPolicy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- Provisioning
State string - Provisioning state of access policy
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- Provisioning
State string - Provisioning state of access policy
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- provisioning
State String - Provisioning state of access policy
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the resource
- provisioning
State string - Provisioning state of access policy
- type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the resource
- provisioning_
state str - Provisioning state of access policy
- type str
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- provisioning
State String - Provisioning state of access policy
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:cache:AccessPolicy accessPolicy1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/accessPolicies/{accessPolicyName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v2 pulumi/pulumi-azure-native
- License
- Apache-2.0