1. Packages
  2. Azure Native
  3. API Docs
  4. cache
  5. AccessPolicyAssignment
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.66.0 published on Wednesday, Oct 9, 2024 by Pulumi

azure-native.cache.AccessPolicyAssignment

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.66.0 published on Wednesday, Oct 9, 2024 by Pulumi

    Response to an operation on access policy assignment Azure REST API version: 2023-05-01-preview.

    Other available API versions: 2023-08-01, 2024-03-01, 2024-04-01-preview, 2024-09-01-preview.

    Example Usage

    RedisCacheAccessPolicyAssignmentCreateUpdate

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var accessPolicyAssignment = new AzureNative.Cache.AccessPolicyAssignment("accessPolicyAssignment", new()
        {
            AccessPolicyAssignmentName = "accessPolicyAssignmentName1",
            AccessPolicyName = "accessPolicy1",
            CacheName = "cache1",
            ObjectId = "6497c918-11ad-41e7-1b0f-7c518a87d0b0",
            ObjectIdAlias = "TestAADAppRedis",
            ResourceGroupName = "rg1",
        });
    
    });
    
    package main
    
    import (
    	cache "github.com/pulumi/pulumi-azure-native-sdk/cache/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cache.NewAccessPolicyAssignment(ctx, "accessPolicyAssignment", &cache.AccessPolicyAssignmentArgs{
    			AccessPolicyAssignmentName: pulumi.String("accessPolicyAssignmentName1"),
    			AccessPolicyName:           pulumi.String("accessPolicy1"),
    			CacheName:                  pulumi.String("cache1"),
    			ObjectId:                   pulumi.String("6497c918-11ad-41e7-1b0f-7c518a87d0b0"),
    			ObjectIdAlias:              pulumi.String("TestAADAppRedis"),
    			ResourceGroupName:          pulumi.String("rg1"),
    		})
    		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.cache.AccessPolicyAssignment;
    import com.pulumi.azurenative.cache.AccessPolicyAssignmentArgs;
    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("accessPolicyAssignmentName1")
                .accessPolicyName("accessPolicy1")
                .cacheName("cache1")
                .objectId("6497c918-11ad-41e7-1b0f-7c518a87d0b0")
                .objectIdAlias("TestAADAppRedis")
                .resourceGroupName("rg1")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    access_policy_assignment = azure_native.cache.AccessPolicyAssignment("accessPolicyAssignment",
        access_policy_assignment_name="accessPolicyAssignmentName1",
        access_policy_name="accessPolicy1",
        cache_name="cache1",
        object_id="6497c918-11ad-41e7-1b0f-7c518a87d0b0",
        object_id_alias="TestAADAppRedis",
        resource_group_name="rg1")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const accessPolicyAssignment = new azure_native.cache.AccessPolicyAssignment("accessPolicyAssignment", {
        accessPolicyAssignmentName: "accessPolicyAssignmentName1",
        accessPolicyName: "accessPolicy1",
        cacheName: "cache1",
        objectId: "6497c918-11ad-41e7-1b0f-7c518a87d0b0",
        objectIdAlias: "TestAADAppRedis",
        resourceGroupName: "rg1",
    });
    
    resources:
      accessPolicyAssignment:
        type: azure-native:cache:AccessPolicyAssignment
        properties:
          accessPolicyAssignmentName: accessPolicyAssignmentName1
          accessPolicyName: accessPolicy1
          cacheName: cache1
          objectId: 6497c918-11ad-41e7-1b0f-7c518a87d0b0
          objectIdAlias: TestAADAppRedis
          resourceGroupName: rg1
    

    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,
                               cache_name: Optional[str] = None,
                               object_id: Optional[str] = None,
                               object_id_alias: Optional[str] = None,
                               resource_group_name: Optional[str] = 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:cache: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 AzureNative.Cache.AccessPolicyAssignment("accessPolicyAssignmentResource", new()
    {
        AccessPolicyName = "string",
        CacheName = "string",
        ObjectId = "string",
        ObjectIdAlias = "string",
        ResourceGroupName = "string",
        AccessPolicyAssignmentName = "string",
    });
    
    example, err := cache.NewAccessPolicyAssignment(ctx, "accessPolicyAssignmentResource", &cache.AccessPolicyAssignmentArgs{
    	AccessPolicyName:           pulumi.String("string"),
    	CacheName:                  pulumi.String("string"),
    	ObjectId:                   pulumi.String("string"),
    	ObjectIdAlias:              pulumi.String("string"),
    	ResourceGroupName:          pulumi.String("string"),
    	AccessPolicyAssignmentName: pulumi.String("string"),
    })
    
    var accessPolicyAssignmentResource = new AccessPolicyAssignment("accessPolicyAssignmentResource", AccessPolicyAssignmentArgs.builder()
        .accessPolicyName("string")
        .cacheName("string")
        .objectId("string")
        .objectIdAlias("string")
        .resourceGroupName("string")
        .accessPolicyAssignmentName("string")
        .build());
    
    access_policy_assignment_resource = azure_native.cache.AccessPolicyAssignment("accessPolicyAssignmentResource",
        access_policy_name="string",
        cache_name="string",
        object_id="string",
        object_id_alias="string",
        resource_group_name="string",
        access_policy_assignment_name="string")
    
    const accessPolicyAssignmentResource = new azure_native.cache.AccessPolicyAssignment("accessPolicyAssignmentResource", {
        accessPolicyName: "string",
        cacheName: "string",
        objectId: "string",
        objectIdAlias: "string",
        resourceGroupName: "string",
        accessPolicyAssignmentName: "string",
    });
    
    type: azure-native:cache:AccessPolicyAssignment
    properties:
        accessPolicyAssignmentName: string
        accessPolicyName: string
        cacheName: string
        objectId: string
        objectIdAlias: string
        resourceGroupName: 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

    The AccessPolicyAssignment resource accepts the following input properties:

    AccessPolicyName string
    The name of the access policy that is being assigned
    CacheName string
    The name of the Redis cache.
    ObjectId string
    Object Id to assign access policy to
    ObjectIdAlias string
    User friendly name for object id. Also represents username for token based authentication
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    AccessPolicyAssignmentName string
    The name of the access policy assignment.
    AccessPolicyName string
    The name of the access policy that is being assigned
    CacheName string
    The name of the Redis cache.
    ObjectId string
    Object Id to assign access policy to
    ObjectIdAlias string
    User friendly name for object id. Also represents username for token based authentication
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    AccessPolicyAssignmentName string
    The name of the access policy assignment.
    accessPolicyName String
    The name of the access policy that is being assigned
    cacheName String
    The name of the Redis cache.
    objectId String
    Object Id to assign access policy to
    objectIdAlias String
    User friendly name for object id. Also represents username for token based authentication
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    accessPolicyAssignmentName String
    The name of the access policy assignment.
    accessPolicyName string
    The name of the access policy that is being assigned
    cacheName string
    The name of the Redis cache.
    objectId string
    Object Id to assign access policy to
    objectIdAlias string
    User friendly name for object id. Also represents username for token based authentication
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    accessPolicyAssignmentName string
    The name of the access policy assignment.
    access_policy_name str
    The name of the access policy that is being assigned
    cache_name str
    The name of the Redis cache.
    object_id str
    Object Id to assign access policy to
    object_id_alias str
    User friendly name for object id. Also represents username for token based authentication
    resource_group_name str
    The name of the resource group. The name is case insensitive.
    access_policy_assignment_name str
    The name of the access policy assignment.
    accessPolicyName String
    The name of the access policy that is being assigned
    cacheName String
    The name of the Redis cache.
    objectId String
    Object Id to assign access policy to
    objectIdAlias String
    User friendly name for object id. Also represents username for token based authentication
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    accessPolicyAssignmentName String
    The name of the access policy assignment.

    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.
    Name string
    The name of the resource
    ProvisioningState string
    Provisioning state of an access policy assignment set
    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
    ProvisioningState string
    Provisioning state of an access policy assignment set
    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
    provisioningState String
    Provisioning state of an access policy assignment set
    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
    provisioningState string
    Provisioning state of an access policy assignment set
    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 an access policy assignment set
    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
    provisioningState String
    Provisioning state of an access policy assignment set
    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:AccessPolicyAssignment accessPolicyAssignmentName1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/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
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.66.0 published on Wednesday, Oct 9, 2024 by Pulumi