1. Packages
  2. Packages
  3. Azure Native
  4. API Docs
  5. authorization
  6. DenyAssignment
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Viewing docs for Azure Native v3.25.0
published on Wednesday, Aug 5, 2026 by Pulumi
azure-native logo
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Viewing docs for Azure Native v3.25.0
published on Wednesday, Aug 5, 2026 by Pulumi

    Deny Assignment

    Uses Azure REST API version 2024-07-01-preview.

    Example Usage

    Create deny assignment for subscription

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var denyAssignment = new AzureNative.Authorization.DenyAssignment("denyAssignment", new()
        {
            DenyAssignmentEffect = AzureNative.Authorization.DenyAssignmentEffect.Enforced,
            DenyAssignmentId = "64b75d79-7a26-4341-944e-4f1a19f0e6ca",
            DenyAssignmentName = "Deny delete on critical resources",
            Description = "Prevent all users from deleting critical resources in the subscription.",
            DoNotApplyToChildScopes = false,
            ExcludePrincipals = new[]
            {
                new AzureNative.Authorization.Inputs.DenyAssignmentPrincipalArgs
                {
                    Id = "ce2ce14e-85d7-4629-bdbc-454d0519d987",
                    Type = "ServicePrincipal",
                },
            },
            Permissions = new[]
            {
                new AzureNative.Authorization.Inputs.DenyAssignmentPermissionArgs
                {
                    Actions = new[]
                    {
                        "*/delete",
                    },
                    DataActions = new() { },
                    NotActions = new() { },
                    NotDataActions = new() { },
                },
            },
            Principals = new[]
            {
                new AzureNative.Authorization.Inputs.DenyAssignmentPrincipalArgs
                {
                    Id = "00000000-0000-0000-0000-000000000000",
                    Type = "SystemDefined",
                },
            },
            Scope = "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2",
        });
    
    });
    
    package main
    
    import (
    	authorization "github.com/pulumi/pulumi-azure-native-sdk/authorization/v3"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := authorization.NewDenyAssignment(ctx, "denyAssignment", &authorization.DenyAssignmentArgs{
    			DenyAssignmentEffect:    pulumi.String(authorization.DenyAssignmentEffectEnforced),
    			DenyAssignmentId:        pulumi.String("64b75d79-7a26-4341-944e-4f1a19f0e6ca"),
    			DenyAssignmentName:      pulumi.String("Deny delete on critical resources"),
    			Description:             pulumi.String("Prevent all users from deleting critical resources in the subscription."),
    			DoNotApplyToChildScopes: pulumi.Bool(false),
    			ExcludePrincipals: authorization.DenyAssignmentPrincipalArray{
    				&authorization.DenyAssignmentPrincipalArgs{
    					Id:   pulumi.String("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
    					Type: pulumi.String("ServicePrincipal"),
    				},
    			},
    			Permissions: authorization.DenyAssignmentPermissionArray{
    				&authorization.DenyAssignmentPermissionArgs{
    					Actions: pulumi.StringArray{
    						pulumi.String("*/delete"),
    					},
    					DataActions:    pulumi.StringArray{},
    					NotActions:     pulumi.StringArray{},
    					NotDataActions: pulumi.StringArray{},
    				},
    			},
    			Principals: authorization.DenyAssignmentPrincipalArray{
    				&authorization.DenyAssignmentPrincipalArgs{
    					Id:   pulumi.String("00000000-0000-0000-0000-000000000000"),
    					Type: pulumi.String("SystemDefined"),
    				},
    			},
    			Scope: pulumi.String("subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    pulumi {
      required_providers {
        azure-native = {
          source = "pulumi/azure-native"
        }
      }
    }
    
    resource "azure-native_authorization_denyassignment" "denyAssignment" {
      deny_assignment_effect       = "enforced"
      deny_assignment_id           = "64b75d79-7a26-4341-944e-4f1a19f0e6ca"
      deny_assignment_name         = "Deny delete on critical resources"
      description                  = "Prevent all users from deleting critical resources in the subscription."
      do_not_apply_to_child_scopes = false
      exclude_principals {
        id   = "ce2ce14e-85d7-4629-bdbc-454d0519d987"
        type = "ServicePrincipal"
      }
      permissions {
        actions          = ["*/delete"]
        data_actions     = []
        not_actions      = []
        not_data_actions = []
      }
      principals {
        id   = "00000000-0000-0000-0000-000000000000"
        type = "SystemDefined"
      }
      scope = "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.authorization.DenyAssignment;
    import com.pulumi.azurenative.authorization.DenyAssignmentArgs;
    import com.pulumi.azurenative.authorization.inputs.DenyAssignmentPrincipalArgs;
    import com.pulumi.azurenative.authorization.inputs.DenyAssignmentPermissionArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 denyAssignment = new DenyAssignment("denyAssignment", DenyAssignmentArgs.builder()
                .denyAssignmentEffect("enforced")
                .denyAssignmentId("64b75d79-7a26-4341-944e-4f1a19f0e6ca")
                .denyAssignmentName("Deny delete on critical resources")
                .description("Prevent all users from deleting critical resources in the subscription.")
                .doNotApplyToChildScopes(false)
                .excludePrincipals(DenyAssignmentPrincipalArgs.builder()
                    .id("ce2ce14e-85d7-4629-bdbc-454d0519d987")
                    .type("ServicePrincipal")
                    .build())
                .permissions(DenyAssignmentPermissionArgs.builder()
                    .actions("*/delete")
                    .dataActions()
                    .notActions()
                    .notDataActions()
                    .build())
                .principals(DenyAssignmentPrincipalArgs.builder()
                    .id("00000000-0000-0000-0000-000000000000")
                    .type("SystemDefined")
                    .build())
                .scope("subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const denyAssignment = new azure_native.authorization.DenyAssignment("denyAssignment", {
        denyAssignmentEffect: azure_native.authorization.DenyAssignmentEffect.Enforced,
        denyAssignmentId: "64b75d79-7a26-4341-944e-4f1a19f0e6ca",
        denyAssignmentName: "Deny delete on critical resources",
        description: "Prevent all users from deleting critical resources in the subscription.",
        doNotApplyToChildScopes: false,
        excludePrincipals: [{
            id: "ce2ce14e-85d7-4629-bdbc-454d0519d987",
            type: "ServicePrincipal",
        }],
        permissions: [{
            actions: ["*/delete"],
            dataActions: [],
            notActions: [],
            notDataActions: [],
        }],
        principals: [{
            id: "00000000-0000-0000-0000-000000000000",
            type: "SystemDefined",
        }],
        scope: "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2",
    });
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    deny_assignment = azure_native.authorization.DenyAssignment("denyAssignment",
        deny_assignment_effect=azure_native.authorization.DenyAssignmentEffect.ENFORCED,
        deny_assignment_id="64b75d79-7a26-4341-944e-4f1a19f0e6ca",
        deny_assignment_name="Deny delete on critical resources",
        description="Prevent all users from deleting critical resources in the subscription.",
        do_not_apply_to_child_scopes=False,
        exclude_principals=[{
            "id": "ce2ce14e-85d7-4629-bdbc-454d0519d987",
            "type": "ServicePrincipal",
        }],
        permissions=[{
            "actions": ["*/delete"],
            "data_actions": [],
            "not_actions": [],
            "not_data_actions": [],
        }],
        principals=[{
            "id": "00000000-0000-0000-0000-000000000000",
            "type": "SystemDefined",
        }],
        scope="subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2")
    
    resources:
      denyAssignment:
        type: azure-native:authorization:DenyAssignment
        properties:
          denyAssignmentEffect: enforced
          denyAssignmentId: 64b75d79-7a26-4341-944e-4f1a19f0e6ca
          denyAssignmentName: Deny delete on critical resources
          description: Prevent all users from deleting critical resources in the subscription.
          doNotApplyToChildScopes: false
          excludePrincipals:
            - id: ce2ce14e-85d7-4629-bdbc-454d0519d987
              type: ServicePrincipal
          permissions:
            - actions:
                - '*/delete'
              dataActions: []
              notActions: []
              notDataActions: []
          principals:
            - id: 00000000-0000-0000-0000-000000000000
              type: SystemDefined
          scope: subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2
    

    Create DenyAssignment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DenyAssignment(name: string, args: DenyAssignmentArgs, opts?: CustomResourceOptions);
    @overload
    def DenyAssignment(resource_name: str,
                       args: DenyAssignmentArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def DenyAssignment(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       scope: Optional[str] = None,
                       condition: Optional[str] = None,
                       condition_version: Optional[str] = None,
                       deny_assignment_effect: Optional[Union[str, DenyAssignmentEffect]] = None,
                       deny_assignment_id: Optional[str] = None,
                       deny_assignment_name: Optional[str] = None,
                       description: Optional[str] = None,
                       do_not_apply_to_child_scopes: Optional[bool] = None,
                       exclude_principals: Optional[Sequence[DenyAssignmentPrincipalArgs]] = None,
                       is_system_protected: Optional[bool] = None,
                       permissions: Optional[Sequence[DenyAssignmentPermissionArgs]] = None,
                       principals: Optional[Sequence[DenyAssignmentPrincipalArgs]] = None)
    func NewDenyAssignment(ctx *Context, name string, args DenyAssignmentArgs, opts ...ResourceOption) (*DenyAssignment, error)
    public DenyAssignment(string name, DenyAssignmentArgs args, CustomResourceOptions? opts = null)
    public DenyAssignment(String name, DenyAssignmentArgs args)
    public DenyAssignment(String name, DenyAssignmentArgs args, CustomResourceOptions options)
    
    type: azure-native:authorization:DenyAssignment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "azure-native_authorization_deny_assignment" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args DenyAssignmentArgs
    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 DenyAssignmentArgs
    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 DenyAssignmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DenyAssignmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DenyAssignmentArgs
    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 denyAssignmentResource = new AzureNative.Authorization.DenyAssignment("denyAssignmentResource", new()
    {
        Scope = "string",
        Condition = "string",
        ConditionVersion = "string",
        DenyAssignmentEffect = "string",
        DenyAssignmentId = "string",
        DenyAssignmentName = "string",
        Description = "string",
        DoNotApplyToChildScopes = false,
        ExcludePrincipals = new[]
        {
            new AzureNative.Authorization.Inputs.DenyAssignmentPrincipalArgs
            {
                Id = "string",
                Type = "string",
            },
        },
        IsSystemProtected = false,
        Permissions = new[]
        {
            new AzureNative.Authorization.Inputs.DenyAssignmentPermissionArgs
            {
                Actions = new[]
                {
                    "string",
                },
                Condition = "string",
                ConditionVersion = "string",
                DataActions = new[]
                {
                    "string",
                },
                NotActions = new[]
                {
                    "string",
                },
                NotDataActions = new[]
                {
                    "string",
                },
            },
        },
        Principals = new[]
        {
            new AzureNative.Authorization.Inputs.DenyAssignmentPrincipalArgs
            {
                Id = "string",
                Type = "string",
            },
        },
    });
    
    example, err := authorization.NewDenyAssignment(ctx, "denyAssignmentResource", &authorization.DenyAssignmentArgs{
    	Scope:                   pulumi.String("string"),
    	Condition:               pulumi.String("string"),
    	ConditionVersion:        pulumi.String("string"),
    	DenyAssignmentEffect:    pulumi.String("string"),
    	DenyAssignmentId:        pulumi.String("string"),
    	DenyAssignmentName:      pulumi.String("string"),
    	Description:             pulumi.String("string"),
    	DoNotApplyToChildScopes: pulumi.Bool(false),
    	ExcludePrincipals: authorization.DenyAssignmentPrincipalArray{
    		&authorization.DenyAssignmentPrincipalArgs{
    			Id:   pulumi.String("string"),
    			Type: pulumi.String("string"),
    		},
    	},
    	IsSystemProtected: pulumi.Bool(false),
    	Permissions: authorization.DenyAssignmentPermissionArray{
    		&authorization.DenyAssignmentPermissionArgs{
    			Actions: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Condition:        pulumi.String("string"),
    			ConditionVersion: pulumi.String("string"),
    			DataActions: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			NotActions: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			NotDataActions: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	Principals: authorization.DenyAssignmentPrincipalArray{
    		&authorization.DenyAssignmentPrincipalArgs{
    			Id:   pulumi.String("string"),
    			Type: pulumi.String("string"),
    		},
    	},
    })
    
    resource "azure-native_authorization_deny_assignment" "denyAssignmentResource" {
      lifecycle {
        create_before_destroy = true
      }
      scope                        = "string"
      condition                    = "string"
      condition_version            = "string"
      deny_assignment_effect       = "string"
      deny_assignment_id           = "string"
      deny_assignment_name         = "string"
      description                  = "string"
      do_not_apply_to_child_scopes = false
      exclude_principals {
        id   = "string"
        type = "string"
      }
      is_system_protected = false
      permissions {
        actions           = ["string"]
        condition         = "string"
        condition_version = "string"
        data_actions      = ["string"]
        not_actions       = ["string"]
        not_data_actions  = ["string"]
      }
      principals {
        id   = "string"
        type = "string"
      }
    }
    
    var denyAssignmentResource = new DenyAssignment("denyAssignmentResource", DenyAssignmentArgs.builder()
        .scope("string")
        .condition("string")
        .conditionVersion("string")
        .denyAssignmentEffect("string")
        .denyAssignmentId("string")
        .denyAssignmentName("string")
        .description("string")
        .doNotApplyToChildScopes(false)
        .excludePrincipals(DenyAssignmentPrincipalArgs.builder()
            .id("string")
            .type("string")
            .build())
        .isSystemProtected(false)
        .permissions(DenyAssignmentPermissionArgs.builder()
            .actions("string")
            .condition("string")
            .conditionVersion("string")
            .dataActions("string")
            .notActions("string")
            .notDataActions("string")
            .build())
        .principals(DenyAssignmentPrincipalArgs.builder()
            .id("string")
            .type("string")
            .build())
        .build());
    
    deny_assignment_resource = azure_native.authorization.DenyAssignment("denyAssignmentResource",
        scope="string",
        condition="string",
        condition_version="string",
        deny_assignment_effect="string",
        deny_assignment_id="string",
        deny_assignment_name="string",
        description="string",
        do_not_apply_to_child_scopes=False,
        exclude_principals=[{
            "id": "string",
            "type": "string",
        }],
        is_system_protected=False,
        permissions=[{
            "actions": ["string"],
            "condition": "string",
            "condition_version": "string",
            "data_actions": ["string"],
            "not_actions": ["string"],
            "not_data_actions": ["string"],
        }],
        principals=[{
            "id": "string",
            "type": "string",
        }])
    
    const denyAssignmentResource = new azure_native.authorization.DenyAssignment("denyAssignmentResource", {
        scope: "string",
        condition: "string",
        conditionVersion: "string",
        denyAssignmentEffect: "string",
        denyAssignmentId: "string",
        denyAssignmentName: "string",
        description: "string",
        doNotApplyToChildScopes: false,
        excludePrincipals: [{
            id: "string",
            type: "string",
        }],
        isSystemProtected: false,
        permissions: [{
            actions: ["string"],
            condition: "string",
            conditionVersion: "string",
            dataActions: ["string"],
            notActions: ["string"],
            notDataActions: ["string"],
        }],
        principals: [{
            id: "string",
            type: "string",
        }],
    });
    
    type: azure-native:authorization:DenyAssignment
    properties:
        condition: string
        conditionVersion: string
        denyAssignmentEffect: string
        denyAssignmentId: string
        denyAssignmentName: string
        description: string
        doNotApplyToChildScopes: false
        excludePrincipals:
            - id: string
              type: string
        isSystemProtected: false
        permissions:
            - actions:
                - string
              condition: string
              conditionVersion: string
              dataActions:
                - string
              notActions:
                - string
              notDataActions:
                - string
        principals:
            - id: string
              type: string
        scope: string
    

    DenyAssignment 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 DenyAssignment resource accepts the following input properties:

    Scope string
    The fully qualified Azure Resource manager identifier of the resource.
    Condition string
    The conditions on the deny assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
    ConditionVersion string
    Version of the condition.
    DenyAssignmentEffect string | Pulumi.AzureNative.Authorization.DenyAssignmentEffect
    The effect of the deny assignment. 'enforced' blocks access, 'audit' logs without blocking.
    DenyAssignmentId string
    The ID of the deny assignment to get.
    DenyAssignmentName string
    The display name of the deny assignment.
    Description string
    The description of the deny assignment.
    DoNotApplyToChildScopes bool
    Determines if the deny assignment applies to child scopes. Default value is false.
    ExcludePrincipals List<Pulumi.AzureNative.Authorization.Inputs.DenyAssignmentPrincipal>
    Array of principals to which the deny assignment does not apply.
    IsSystemProtected bool
    Specifies whether this deny assignment was created by Azure and cannot be edited or deleted.
    Permissions List<Pulumi.AzureNative.Authorization.Inputs.DenyAssignmentPermission>
    An array of permissions that are denied by the deny assignment.
    Principals List<Pulumi.AzureNative.Authorization.Inputs.DenyAssignmentPrincipal>
    Array of principals to which the deny assignment applies.
    Scope string
    The fully qualified Azure Resource manager identifier of the resource.
    Condition string
    The conditions on the deny assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
    ConditionVersion string
    Version of the condition.
    DenyAssignmentEffect string | DenyAssignmentEffect
    The effect of the deny assignment. 'enforced' blocks access, 'audit' logs without blocking.
    DenyAssignmentId string
    The ID of the deny assignment to get.
    DenyAssignmentName string
    The display name of the deny assignment.
    Description string
    The description of the deny assignment.
    DoNotApplyToChildScopes bool
    Determines if the deny assignment applies to child scopes. Default value is false.
    ExcludePrincipals []DenyAssignmentPrincipalArgs
    Array of principals to which the deny assignment does not apply.
    IsSystemProtected bool
    Specifies whether this deny assignment was created by Azure and cannot be edited or deleted.
    Permissions []DenyAssignmentPermissionArgs
    An array of permissions that are denied by the deny assignment.
    Principals []DenyAssignmentPrincipalArgs
    Array of principals to which the deny assignment applies.
    scope string
    The fully qualified Azure Resource manager identifier of the resource.
    condition string
    The conditions on the deny assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
    condition_version string
    Version of the condition.
    deny_assignment_effect string | "enforced" | "audit"
    The effect of the deny assignment. 'enforced' blocks access, 'audit' logs without blocking.
    deny_assignment_id string
    The ID of the deny assignment to get.
    deny_assignment_name string
    The display name of the deny assignment.
    description string
    The description of the deny assignment.
    do_not_apply_to_child_scopes bool
    Determines if the deny assignment applies to child scopes. Default value is false.
    exclude_principals list(object)
    Array of principals to which the deny assignment does not apply.
    is_system_protected bool
    Specifies whether this deny assignment was created by Azure and cannot be edited or deleted.
    permissions list(object)
    An array of permissions that are denied by the deny assignment.
    principals list(object)
    Array of principals to which the deny assignment applies.
    scope String
    The fully qualified Azure Resource manager identifier of the resource.
    condition String
    The conditions on the deny assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
    conditionVersion String
    Version of the condition.
    denyAssignmentEffect String | DenyAssignmentEffect
    The effect of the deny assignment. 'enforced' blocks access, 'audit' logs without blocking.
    denyAssignmentId String
    The ID of the deny assignment to get.
    denyAssignmentName String
    The display name of the deny assignment.
    description String
    The description of the deny assignment.
    doNotApplyToChildScopes Boolean
    Determines if the deny assignment applies to child scopes. Default value is false.
    excludePrincipals List<DenyAssignmentPrincipal>
    Array of principals to which the deny assignment does not apply.
    isSystemProtected Boolean
    Specifies whether this deny assignment was created by Azure and cannot be edited or deleted.
    permissions List<DenyAssignmentPermission>
    An array of permissions that are denied by the deny assignment.
    principals List<DenyAssignmentPrincipal>
    Array of principals to which the deny assignment applies.
    scope string
    The fully qualified Azure Resource manager identifier of the resource.
    condition string
    The conditions on the deny assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
    conditionVersion string
    Version of the condition.
    denyAssignmentEffect string | DenyAssignmentEffect
    The effect of the deny assignment. 'enforced' blocks access, 'audit' logs without blocking.
    denyAssignmentId string
    The ID of the deny assignment to get.
    denyAssignmentName string
    The display name of the deny assignment.
    description string
    The description of the deny assignment.
    doNotApplyToChildScopes boolean
    Determines if the deny assignment applies to child scopes. Default value is false.
    excludePrincipals DenyAssignmentPrincipal[]
    Array of principals to which the deny assignment does not apply.
    isSystemProtected boolean
    Specifies whether this deny assignment was created by Azure and cannot be edited or deleted.
    permissions DenyAssignmentPermission[]
    An array of permissions that are denied by the deny assignment.
    principals DenyAssignmentPrincipal[]
    Array of principals to which the deny assignment applies.
    scope str
    The fully qualified Azure Resource manager identifier of the resource.
    condition str
    The conditions on the deny assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
    condition_version str
    Version of the condition.
    deny_assignment_effect str | DenyAssignmentEffect
    The effect of the deny assignment. 'enforced' blocks access, 'audit' logs without blocking.
    deny_assignment_id str
    The ID of the deny assignment to get.
    deny_assignment_name str
    The display name of the deny assignment.
    description str
    The description of the deny assignment.
    do_not_apply_to_child_scopes bool
    Determines if the deny assignment applies to child scopes. Default value is false.
    exclude_principals Sequence[DenyAssignmentPrincipalArgs]
    Array of principals to which the deny assignment does not apply.
    is_system_protected bool
    Specifies whether this deny assignment was created by Azure and cannot be edited or deleted.
    permissions Sequence[DenyAssignmentPermissionArgs]
    An array of permissions that are denied by the deny assignment.
    principals Sequence[DenyAssignmentPrincipalArgs]
    Array of principals to which the deny assignment applies.
    scope String
    The fully qualified Azure Resource manager identifier of the resource.
    condition String
    The conditions on the deny assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
    conditionVersion String
    Version of the condition.
    denyAssignmentEffect String | "enforced" | "audit"
    The effect of the deny assignment. 'enforced' blocks access, 'audit' logs without blocking.
    denyAssignmentId String
    The ID of the deny assignment to get.
    denyAssignmentName String
    The display name of the deny assignment.
    description String
    The description of the deny assignment.
    doNotApplyToChildScopes Boolean
    Determines if the deny assignment applies to child scopes. Default value is false.
    excludePrincipals List<Property Map>
    Array of principals to which the deny assignment does not apply.
    isSystemProtected Boolean
    Specifies whether this deny assignment was created by Azure and cannot be edited or deleted.
    permissions List<Property Map>
    An array of permissions that are denied by the deny assignment.
    principals List<Property Map>
    Array of principals to which the deny assignment applies.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DenyAssignment resource produces the following output properties:

    AzureApiVersion string
    The Azure API version of the resource.
    CreatedBy string
    Id of the user who created the assignment
    CreatedOn string
    Time it was created
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    SystemData Pulumi.AzureNative.Authorization.Outputs.SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    UpdatedBy string
    Id of the user who updated the assignment
    UpdatedOn string
    Time it was updated
    AzureApiVersion string
    The Azure API version of the resource.
    CreatedBy string
    Id of the user who created the assignment
    CreatedOn string
    Time it was created
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    SystemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    UpdatedBy string
    Id of the user who updated the assignment
    UpdatedOn string
    Time it was updated
    azure_api_version string
    The Azure API version of the resource.
    created_by string
    Id of the user who created the assignment
    created_on string
    Time it was created
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the resource
    system_data object
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    updated_by string
    Id of the user who updated the assignment
    updated_on string
    Time it was updated
    azureApiVersion String
    The Azure API version of the resource.
    createdBy String
    Id of the user who created the assignment
    createdOn String
    Time it was created
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    updatedBy String
    Id of the user who updated the assignment
    updatedOn String
    Time it was updated
    azureApiVersion string
    The Azure API version of the resource.
    createdBy string
    Id of the user who created the assignment
    createdOn string
    Time it was created
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the resource
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    updatedBy string
    Id of the user who updated the assignment
    updatedOn string
    Time it was updated
    azure_api_version str
    The Azure API version of the resource.
    created_by str
    Id of the user who created the assignment
    created_on str
    Time it was created
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the resource
    system_data SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type str
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    updated_by str
    Id of the user who updated the assignment
    updated_on str
    Time it was updated
    azureApiVersion String
    The Azure API version of the resource.
    createdBy String
    Id of the user who created the assignment
    createdOn String
    Time it was created
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    systemData Property Map
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    updatedBy String
    Id of the user who updated the assignment
    updatedOn String
    Time it was updated

    Supporting Types

    DenyAssignmentEffect, DenyAssignmentEffectArgs

    Enforced
    enforced enforced
    Audit
    audit audit
    DenyAssignmentEffectEnforced
    enforced enforced
    DenyAssignmentEffectAudit
    audit audit
    "enforced"
    enforced enforced
    "audit"
    audit audit
    Enforced
    enforced enforced
    Audit
    audit audit
    Enforced
    enforced enforced
    Audit
    audit audit
    ENFORCED
    enforced enforced
    AUDIT
    audit audit
    "enforced"
    enforced enforced
    "audit"
    audit audit

    DenyAssignmentPermission, DenyAssignmentPermissionArgs

    Deny assignment permissions.
    Actions List<string>
    Actions to which the deny assignment does not grant access.
    Condition string
    The conditions on the Deny assignment permission. This limits the resources it applies to.
    ConditionVersion string
    Version of the condition.
    DataActions List<string>
    Data actions to which the deny assignment does not grant access.
    NotActions List<string>
    Actions to exclude from that the deny assignment does not grant access.
    NotDataActions List<string>
    Data actions to exclude from that the deny assignment does not grant access.
    Actions []string
    Actions to which the deny assignment does not grant access.
    Condition string
    The conditions on the Deny assignment permission. This limits the resources it applies to.
    ConditionVersion string
    Version of the condition.
    DataActions []string
    Data actions to which the deny assignment does not grant access.
    NotActions []string
    Actions to exclude from that the deny assignment does not grant access.
    NotDataActions []string
    Data actions to exclude from that the deny assignment does not grant access.
    actions list(string)
    Actions to which the deny assignment does not grant access.
    condition string
    The conditions on the Deny assignment permission. This limits the resources it applies to.
    condition_version string
    Version of the condition.
    data_actions list(string)
    Data actions to which the deny assignment does not grant access.
    not_actions list(string)
    Actions to exclude from that the deny assignment does not grant access.
    not_data_actions list(string)
    Data actions to exclude from that the deny assignment does not grant access.
    actions List<String>
    Actions to which the deny assignment does not grant access.
    condition String
    The conditions on the Deny assignment permission. This limits the resources it applies to.
    conditionVersion String
    Version of the condition.
    dataActions List<String>
    Data actions to which the deny assignment does not grant access.
    notActions List<String>
    Actions to exclude from that the deny assignment does not grant access.
    notDataActions List<String>
    Data actions to exclude from that the deny assignment does not grant access.
    actions string[]
    Actions to which the deny assignment does not grant access.
    condition string
    The conditions on the Deny assignment permission. This limits the resources it applies to.
    conditionVersion string
    Version of the condition.
    dataActions string[]
    Data actions to which the deny assignment does not grant access.
    notActions string[]
    Actions to exclude from that the deny assignment does not grant access.
    notDataActions string[]
    Data actions to exclude from that the deny assignment does not grant access.
    actions Sequence[str]
    Actions to which the deny assignment does not grant access.
    condition str
    The conditions on the Deny assignment permission. This limits the resources it applies to.
    condition_version str
    Version of the condition.
    data_actions Sequence[str]
    Data actions to which the deny assignment does not grant access.
    not_actions Sequence[str]
    Actions to exclude from that the deny assignment does not grant access.
    not_data_actions Sequence[str]
    Data actions to exclude from that the deny assignment does not grant access.
    actions List<String>
    Actions to which the deny assignment does not grant access.
    condition String
    The conditions on the Deny assignment permission. This limits the resources it applies to.
    conditionVersion String
    Version of the condition.
    dataActions List<String>
    Data actions to which the deny assignment does not grant access.
    notActions List<String>
    Actions to exclude from that the deny assignment does not grant access.
    notDataActions List<String>
    Data actions to exclude from that the deny assignment does not grant access.

    DenyAssignmentPermissionResponse, DenyAssignmentPermissionResponseArgs

    Deny assignment permissions.
    Actions List<string>
    Actions to which the deny assignment does not grant access.
    Condition string
    The conditions on the Deny assignment permission. This limits the resources it applies to.
    ConditionVersion string
    Version of the condition.
    DataActions List<string>
    Data actions to which the deny assignment does not grant access.
    NotActions List<string>
    Actions to exclude from that the deny assignment does not grant access.
    NotDataActions List<string>
    Data actions to exclude from that the deny assignment does not grant access.
    Actions []string
    Actions to which the deny assignment does not grant access.
    Condition string
    The conditions on the Deny assignment permission. This limits the resources it applies to.
    ConditionVersion string
    Version of the condition.
    DataActions []string
    Data actions to which the deny assignment does not grant access.
    NotActions []string
    Actions to exclude from that the deny assignment does not grant access.
    NotDataActions []string
    Data actions to exclude from that the deny assignment does not grant access.
    actions list(string)
    Actions to which the deny assignment does not grant access.
    condition string
    The conditions on the Deny assignment permission. This limits the resources it applies to.
    condition_version string
    Version of the condition.
    data_actions list(string)
    Data actions to which the deny assignment does not grant access.
    not_actions list(string)
    Actions to exclude from that the deny assignment does not grant access.
    not_data_actions list(string)
    Data actions to exclude from that the deny assignment does not grant access.
    actions List<String>
    Actions to which the deny assignment does not grant access.
    condition String
    The conditions on the Deny assignment permission. This limits the resources it applies to.
    conditionVersion String
    Version of the condition.
    dataActions List<String>
    Data actions to which the deny assignment does not grant access.
    notActions List<String>
    Actions to exclude from that the deny assignment does not grant access.
    notDataActions List<String>
    Data actions to exclude from that the deny assignment does not grant access.
    actions string[]
    Actions to which the deny assignment does not grant access.
    condition string
    The conditions on the Deny assignment permission. This limits the resources it applies to.
    conditionVersion string
    Version of the condition.
    dataActions string[]
    Data actions to which the deny assignment does not grant access.
    notActions string[]
    Actions to exclude from that the deny assignment does not grant access.
    notDataActions string[]
    Data actions to exclude from that the deny assignment does not grant access.
    actions Sequence[str]
    Actions to which the deny assignment does not grant access.
    condition str
    The conditions on the Deny assignment permission. This limits the resources it applies to.
    condition_version str
    Version of the condition.
    data_actions Sequence[str]
    Data actions to which the deny assignment does not grant access.
    not_actions Sequence[str]
    Actions to exclude from that the deny assignment does not grant access.
    not_data_actions Sequence[str]
    Data actions to exclude from that the deny assignment does not grant access.
    actions List<String>
    Actions to which the deny assignment does not grant access.
    condition String
    The conditions on the Deny assignment permission. This limits the resources it applies to.
    conditionVersion String
    Version of the condition.
    dataActions List<String>
    Data actions to which the deny assignment does not grant access.
    notActions List<String>
    Actions to exclude from that the deny assignment does not grant access.
    notDataActions List<String>
    Data actions to exclude from that the deny assignment does not grant access.

    DenyAssignmentPrincipal, DenyAssignmentPrincipalArgs

    Deny assignment principal.
    Id string
    The object ID of the principal.
    Type string
    The type of the principal such as user, group, servicePrincipal, etc.
    Id string
    The object ID of the principal.
    Type string
    The type of the principal such as user, group, servicePrincipal, etc.
    id string
    The object ID of the principal.
    type string
    The type of the principal such as user, group, servicePrincipal, etc.
    id String
    The object ID of the principal.
    type String
    The type of the principal such as user, group, servicePrincipal, etc.
    id string
    The object ID of the principal.
    type string
    The type of the principal such as user, group, servicePrincipal, etc.
    id str
    The object ID of the principal.
    type str
    The type of the principal such as user, group, servicePrincipal, etc.
    id String
    The object ID of the principal.
    type String
    The type of the principal such as user, group, servicePrincipal, etc.

    DenyAssignmentPrincipalResponse, DenyAssignmentPrincipalResponseArgs

    Deny assignment principal.
    Id string
    The object ID of the principal.
    Type string
    The type of the principal such as user, group, servicePrincipal, etc.
    Id string
    The object ID of the principal.
    Type string
    The type of the principal such as user, group, servicePrincipal, etc.
    id string
    The object ID of the principal.
    type string
    The type of the principal such as user, group, servicePrincipal, etc.
    id String
    The object ID of the principal.
    type String
    The type of the principal such as user, group, servicePrincipal, etc.
    id string
    The object ID of the principal.
    type string
    The type of the principal such as user, group, servicePrincipal, etc.
    id str
    The object ID of the principal.
    type str
    The type of the principal such as user, group, servicePrincipal, etc.
    id String
    The object ID of the principal.
    type String
    The type of the principal such as user, group, servicePrincipal, etc.

    SystemDataResponse, SystemDataResponseArgs

    Metadata pertaining to creation and last modification of the resource.
    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    created_at string
    The timestamp of resource creation (UTC).
    created_by string
    The identity that created the resource.
    created_by_type string
    The type of identity that created the resource.
    last_modified_at string
    The timestamp of resource last modification (UTC)
    last_modified_by string
    The identity that last modified the resource.
    last_modified_by_type string
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.
    createdAt string
    The timestamp of resource creation (UTC).
    createdBy string
    The identity that created the resource.
    createdByType string
    The type of identity that created the resource.
    lastModifiedAt string
    The timestamp of resource last modification (UTC)
    lastModifiedBy string
    The identity that last modified the resource.
    lastModifiedByType string
    The type of identity that last modified the resource.
    created_at str
    The timestamp of resource creation (UTC).
    created_by str
    The identity that created the resource.
    created_by_type str
    The type of identity that created the resource.
    last_modified_at str
    The timestamp of resource last modification (UTC)
    last_modified_by str
    The identity that last modified the resource.
    last_modified_by_type str
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:authorization:DenyAssignment 64b75d79-7a26-4341-944e-4f1a19f0e6ca /{scope}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId} 
    

    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 v2 docs if using the v2 version of this package.
    Viewing docs for Azure Native v3.25.0
    published on Wednesday, Aug 5, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial