1. Packages
  2. Azure Active Directory (Azure AD)
  3. API Docs
  4. AdministrativeUnit
Azure Active Directory (Azure AD) v5.47.2 published on Tuesday, Feb 27, 2024 by Pulumi

azuread.AdministrativeUnit

Explore with Pulumi AI

azuread logo
Azure Active Directory (Azure AD) v5.47.2 published on Tuesday, Feb 27, 2024 by Pulumi

    Manages an Administrative Unit within Azure Active Directory.

    API Permissions

    The following API permissions are required in order to use this resource.

    When authenticated with a service principal, this resource requires one of the following application roles: AdministrativeUnit.ReadWrite.All or Directory.ReadWrite.All

    When authenticated with a user principal, this resource requires one of the following directory roles: Privileged Role Administrator or Global Administrator

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureAD = Pulumi.AzureAD;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new AzureAD.AdministrativeUnit("example", new()
        {
            DisplayName = "Example-AU",
            Description = "Just an example",
            HiddenMembershipEnabled = false,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := azuread.NewAdministrativeUnit(ctx, "example", &azuread.AdministrativeUnitArgs{
    			DisplayName:             pulumi.String("Example-AU"),
    			Description:             pulumi.String("Just an example"),
    			HiddenMembershipEnabled: pulumi.Bool(false),
    		})
    		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.azuread.AdministrativeUnit;
    import com.pulumi.azuread.AdministrativeUnitArgs;
    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 example = new AdministrativeUnit("example", AdministrativeUnitArgs.builder()        
                .displayName("Example-AU")
                .description("Just an example")
                .hiddenMembershipEnabled(false)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azuread as azuread
    
    example = azuread.AdministrativeUnit("example",
        display_name="Example-AU",
        description="Just an example",
        hidden_membership_enabled=False)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azuread from "@pulumi/azuread";
    
    const example = new azuread.AdministrativeUnit("example", {
        displayName: "Example-AU",
        description: "Just an example",
        hiddenMembershipEnabled: false,
    });
    
    resources:
      example:
        type: azuread:AdministrativeUnit
        properties:
          displayName: Example-AU
          description: Just an example
          hiddenMembershipEnabled: false
    

    Create AdministrativeUnit Resource

    new AdministrativeUnit(name: string, args: AdministrativeUnitArgs, opts?: CustomResourceOptions);
    @overload
    def AdministrativeUnit(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           description: Optional[str] = None,
                           display_name: Optional[str] = None,
                           hidden_membership_enabled: Optional[bool] = None,
                           members: Optional[Sequence[str]] = None,
                           prevent_duplicate_names: Optional[bool] = None)
    @overload
    def AdministrativeUnit(resource_name: str,
                           args: AdministrativeUnitArgs,
                           opts: Optional[ResourceOptions] = None)
    func NewAdministrativeUnit(ctx *Context, name string, args AdministrativeUnitArgs, opts ...ResourceOption) (*AdministrativeUnit, error)
    public AdministrativeUnit(string name, AdministrativeUnitArgs args, CustomResourceOptions? opts = null)
    public AdministrativeUnit(String name, AdministrativeUnitArgs args)
    public AdministrativeUnit(String name, AdministrativeUnitArgs args, CustomResourceOptions options)
    
    type: azuread:AdministrativeUnit
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args AdministrativeUnitArgs
    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 AdministrativeUnitArgs
    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 AdministrativeUnitArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AdministrativeUnitArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AdministrativeUnitArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    DisplayName string
    The display name of the administrative unit.
    Description string
    The description of the administrative unit.
    HiddenMembershipEnabled bool
    Whether the administrative unit and its members are hidden or publicly viewable in the directory.
    Members List<string>

    A set of object IDs of members who should be present in this administrative unit. Supported object types are Users or Groups.

    !> Warning Do not use the members property at the same time as the azuread.AdministrativeUnitMember resource for the same administrative unit. Doing so will cause a conflict and administrative unit members will be removed.

    PreventDuplicateNames bool
    If true, will return an error if an existing administrative unit is found with the same name
    DisplayName string
    The display name of the administrative unit.
    Description string
    The description of the administrative unit.
    HiddenMembershipEnabled bool
    Whether the administrative unit and its members are hidden or publicly viewable in the directory.
    Members []string

    A set of object IDs of members who should be present in this administrative unit. Supported object types are Users or Groups.

    !> Warning Do not use the members property at the same time as the azuread.AdministrativeUnitMember resource for the same administrative unit. Doing so will cause a conflict and administrative unit members will be removed.

    PreventDuplicateNames bool
    If true, will return an error if an existing administrative unit is found with the same name
    displayName String
    The display name of the administrative unit.
    description String
    The description of the administrative unit.
    hiddenMembershipEnabled Boolean
    Whether the administrative unit and its members are hidden or publicly viewable in the directory.
    members List<String>

    A set of object IDs of members who should be present in this administrative unit. Supported object types are Users or Groups.

    !> Warning Do not use the members property at the same time as the azuread.AdministrativeUnitMember resource for the same administrative unit. Doing so will cause a conflict and administrative unit members will be removed.

    preventDuplicateNames Boolean
    If true, will return an error if an existing administrative unit is found with the same name
    displayName string
    The display name of the administrative unit.
    description string
    The description of the administrative unit.
    hiddenMembershipEnabled boolean
    Whether the administrative unit and its members are hidden or publicly viewable in the directory.
    members string[]

    A set of object IDs of members who should be present in this administrative unit. Supported object types are Users or Groups.

    !> Warning Do not use the members property at the same time as the azuread.AdministrativeUnitMember resource for the same administrative unit. Doing so will cause a conflict and administrative unit members will be removed.

    preventDuplicateNames boolean
    If true, will return an error if an existing administrative unit is found with the same name
    display_name str
    The display name of the administrative unit.
    description str
    The description of the administrative unit.
    hidden_membership_enabled bool
    Whether the administrative unit and its members are hidden or publicly viewable in the directory.
    members Sequence[str]

    A set of object IDs of members who should be present in this administrative unit. Supported object types are Users or Groups.

    !> Warning Do not use the members property at the same time as the azuread.AdministrativeUnitMember resource for the same administrative unit. Doing so will cause a conflict and administrative unit members will be removed.

    prevent_duplicate_names bool
    If true, will return an error if an existing administrative unit is found with the same name
    displayName String
    The display name of the administrative unit.
    description String
    The description of the administrative unit.
    hiddenMembershipEnabled Boolean
    Whether the administrative unit and its members are hidden or publicly viewable in the directory.
    members List<String>

    A set of object IDs of members who should be present in this administrative unit. Supported object types are Users or Groups.

    !> Warning Do not use the members property at the same time as the azuread.AdministrativeUnitMember resource for the same administrative unit. Doing so will cause a conflict and administrative unit members will be removed.

    preventDuplicateNames Boolean
    If true, will return an error if an existing administrative unit is found with the same name

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    ObjectId string
    The object ID of the administrative unit.
    Id string
    The provider-assigned unique ID for this managed resource.
    ObjectId string
    The object ID of the administrative unit.
    id String
    The provider-assigned unique ID for this managed resource.
    objectId String
    The object ID of the administrative unit.
    id string
    The provider-assigned unique ID for this managed resource.
    objectId string
    The object ID of the administrative unit.
    id str
    The provider-assigned unique ID for this managed resource.
    object_id str
    The object ID of the administrative unit.
    id String
    The provider-assigned unique ID for this managed resource.
    objectId String
    The object ID of the administrative unit.

    Look up Existing AdministrativeUnit Resource

    Get an existing AdministrativeUnit 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?: AdministrativeUnitState, opts?: CustomResourceOptions): AdministrativeUnit
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            hidden_membership_enabled: Optional[bool] = None,
            members: Optional[Sequence[str]] = None,
            object_id: Optional[str] = None,
            prevent_duplicate_names: Optional[bool] = None) -> AdministrativeUnit
    func GetAdministrativeUnit(ctx *Context, name string, id IDInput, state *AdministrativeUnitState, opts ...ResourceOption) (*AdministrativeUnit, error)
    public static AdministrativeUnit Get(string name, Input<string> id, AdministrativeUnitState? state, CustomResourceOptions? opts = null)
    public static AdministrativeUnit get(String name, Output<String> id, AdministrativeUnitState 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.
    The following state arguments are supported:
    Description string
    The description of the administrative unit.
    DisplayName string
    The display name of the administrative unit.
    HiddenMembershipEnabled bool
    Whether the administrative unit and its members are hidden or publicly viewable in the directory.
    Members List<string>

    A set of object IDs of members who should be present in this administrative unit. Supported object types are Users or Groups.

    !> Warning Do not use the members property at the same time as the azuread.AdministrativeUnitMember resource for the same administrative unit. Doing so will cause a conflict and administrative unit members will be removed.

    ObjectId string
    The object ID of the administrative unit.
    PreventDuplicateNames bool
    If true, will return an error if an existing administrative unit is found with the same name
    Description string
    The description of the administrative unit.
    DisplayName string
    The display name of the administrative unit.
    HiddenMembershipEnabled bool
    Whether the administrative unit and its members are hidden or publicly viewable in the directory.
    Members []string

    A set of object IDs of members who should be present in this administrative unit. Supported object types are Users or Groups.

    !> Warning Do not use the members property at the same time as the azuread.AdministrativeUnitMember resource for the same administrative unit. Doing so will cause a conflict and administrative unit members will be removed.

    ObjectId string
    The object ID of the administrative unit.
    PreventDuplicateNames bool
    If true, will return an error if an existing administrative unit is found with the same name
    description String
    The description of the administrative unit.
    displayName String
    The display name of the administrative unit.
    hiddenMembershipEnabled Boolean
    Whether the administrative unit and its members are hidden or publicly viewable in the directory.
    members List<String>

    A set of object IDs of members who should be present in this administrative unit. Supported object types are Users or Groups.

    !> Warning Do not use the members property at the same time as the azuread.AdministrativeUnitMember resource for the same administrative unit. Doing so will cause a conflict and administrative unit members will be removed.

    objectId String
    The object ID of the administrative unit.
    preventDuplicateNames Boolean
    If true, will return an error if an existing administrative unit is found with the same name
    description string
    The description of the administrative unit.
    displayName string
    The display name of the administrative unit.
    hiddenMembershipEnabled boolean
    Whether the administrative unit and its members are hidden or publicly viewable in the directory.
    members string[]

    A set of object IDs of members who should be present in this administrative unit. Supported object types are Users or Groups.

    !> Warning Do not use the members property at the same time as the azuread.AdministrativeUnitMember resource for the same administrative unit. Doing so will cause a conflict and administrative unit members will be removed.

    objectId string
    The object ID of the administrative unit.
    preventDuplicateNames boolean
    If true, will return an error if an existing administrative unit is found with the same name
    description str
    The description of the administrative unit.
    display_name str
    The display name of the administrative unit.
    hidden_membership_enabled bool
    Whether the administrative unit and its members are hidden or publicly viewable in the directory.
    members Sequence[str]

    A set of object IDs of members who should be present in this administrative unit. Supported object types are Users or Groups.

    !> Warning Do not use the members property at the same time as the azuread.AdministrativeUnitMember resource for the same administrative unit. Doing so will cause a conflict and administrative unit members will be removed.

    object_id str
    The object ID of the administrative unit.
    prevent_duplicate_names bool
    If true, will return an error if an existing administrative unit is found with the same name
    description String
    The description of the administrative unit.
    displayName String
    The display name of the administrative unit.
    hiddenMembershipEnabled Boolean
    Whether the administrative unit and its members are hidden or publicly viewable in the directory.
    members List<String>

    A set of object IDs of members who should be present in this administrative unit. Supported object types are Users or Groups.

    !> Warning Do not use the members property at the same time as the azuread.AdministrativeUnitMember resource for the same administrative unit. Doing so will cause a conflict and administrative unit members will be removed.

    objectId String
    The object ID of the administrative unit.
    preventDuplicateNames Boolean
    If true, will return an error if an existing administrative unit is found with the same name

    Import

    Administrative units can be imported using their object ID, e.g.

    $ pulumi import azuread:index/administrativeUnit:AdministrativeUnit example 00000000-0000-0000-0000-000000000000
    

    Package Details

    Repository
    Azure Active Directory (Azure AD) pulumi/pulumi-azuread
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azuread Terraform Provider.
    azuread logo
    Azure Active Directory (Azure AD) v5.47.2 published on Tuesday, Feb 27, 2024 by Pulumi