1. Packages
  2. Azure Active Directory (Azure AD)
  3. API Docs
  4. AccessPackage
Azure Active Directory (Azure AD) v5.48.0 published on Monday, Apr 15, 2024 by Pulumi

azuread.AccessPackage

Explore with Pulumi AI

azuread logo
Azure Active Directory (Azure AD) v5.48.0 published on Monday, Apr 15, 2024 by Pulumi

    Manages an Access Package within Identity Governance in 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 the following application role: EntitlementManagement.ReadWrite.All.

    When authenticated with a user principal, this resource requires one of the following directory roles: Catalog owner, Access package manager or Global Administrator

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azuread from "@pulumi/azuread";
    
    const example = new azuread.AccessPackageCatalog("example", {
        displayName: "example-catalog",
        description: "Example catalog",
    });
    const exampleAccessPackage = new azuread.AccessPackage("example", {
        catalogId: example.id,
        displayName: "access-package",
        description: "Access Package",
    });
    
    import pulumi
    import pulumi_azuread as azuread
    
    example = azuread.AccessPackageCatalog("example",
        display_name="example-catalog",
        description="Example catalog")
    example_access_package = azuread.AccessPackage("example",
        catalog_id=example.id,
        display_name="access-package",
        description="Access Package")
    
    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 {
    		example, err := azuread.NewAccessPackageCatalog(ctx, "example", &azuread.AccessPackageCatalogArgs{
    			DisplayName: pulumi.String("example-catalog"),
    			Description: pulumi.String("Example catalog"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuread.NewAccessPackage(ctx, "example", &azuread.AccessPackageArgs{
    			CatalogId:   example.ID(),
    			DisplayName: pulumi.String("access-package"),
    			Description: pulumi.String("Access Package"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureAD = Pulumi.AzureAD;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new AzureAD.AccessPackageCatalog("example", new()
        {
            DisplayName = "example-catalog",
            Description = "Example catalog",
        });
    
        var exampleAccessPackage = new AzureAD.AccessPackage("example", new()
        {
            CatalogId = example.Id,
            DisplayName = "access-package",
            Description = "Access Package",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azuread.AccessPackageCatalog;
    import com.pulumi.azuread.AccessPackageCatalogArgs;
    import com.pulumi.azuread.AccessPackage;
    import com.pulumi.azuread.AccessPackageArgs;
    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 AccessPackageCatalog("example", AccessPackageCatalogArgs.builder()        
                .displayName("example-catalog")
                .description("Example catalog")
                .build());
    
            var exampleAccessPackage = new AccessPackage("exampleAccessPackage", AccessPackageArgs.builder()        
                .catalogId(example.id())
                .displayName("access-package")
                .description("Access Package")
                .build());
    
        }
    }
    
    resources:
      example:
        type: azuread:AccessPackageCatalog
        properties:
          displayName: example-catalog
          description: Example catalog
      exampleAccessPackage:
        type: azuread:AccessPackage
        name: example
        properties:
          catalogId: ${example.id}
          displayName: access-package
          description: Access Package
    

    Create AccessPackage Resource

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

    Constructor syntax

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

    Example

    The following reference example uses placeholder values for all input properties.

    var accessPackageResource = new AzureAD.AccessPackage("accessPackageResource", new()
    {
        CatalogId = "string",
        Description = "string",
        DisplayName = "string",
        Hidden = false,
    });
    
    example, err := azuread.NewAccessPackage(ctx, "accessPackageResource", &azuread.AccessPackageArgs{
    	CatalogId:   pulumi.String("string"),
    	Description: pulumi.String("string"),
    	DisplayName: pulumi.String("string"),
    	Hidden:      pulumi.Bool(false),
    })
    
    var accessPackageResource = new AccessPackage("accessPackageResource", AccessPackageArgs.builder()        
        .catalogId("string")
        .description("string")
        .displayName("string")
        .hidden(false)
        .build());
    
    access_package_resource = azuread.AccessPackage("accessPackageResource",
        catalog_id="string",
        description="string",
        display_name="string",
        hidden=False)
    
    const accessPackageResource = new azuread.AccessPackage("accessPackageResource", {
        catalogId: "string",
        description: "string",
        displayName: "string",
        hidden: false,
    });
    
    type: azuread:AccessPackage
    properties:
        catalogId: string
        description: string
        displayName: string
        hidden: false
    

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

    CatalogId string
    The ID of the Catalog this access package will be created in.
    Description string
    The description of the access package.
    DisplayName string
    The display name of the access package.
    Hidden bool
    Whether the access package is hidden from the requestor.
    CatalogId string
    The ID of the Catalog this access package will be created in.
    Description string
    The description of the access package.
    DisplayName string
    The display name of the access package.
    Hidden bool
    Whether the access package is hidden from the requestor.
    catalogId String
    The ID of the Catalog this access package will be created in.
    description String
    The description of the access package.
    displayName String
    The display name of the access package.
    hidden Boolean
    Whether the access package is hidden from the requestor.
    catalogId string
    The ID of the Catalog this access package will be created in.
    description string
    The description of the access package.
    displayName string
    The display name of the access package.
    hidden boolean
    Whether the access package is hidden from the requestor.
    catalog_id str
    The ID of the Catalog this access package will be created in.
    description str
    The description of the access package.
    display_name str
    The display name of the access package.
    hidden bool
    Whether the access package is hidden from the requestor.
    catalogId String
    The ID of the Catalog this access package will be created in.
    description String
    The description of the access package.
    displayName String
    The display name of the access package.
    hidden Boolean
    Whether the access package is hidden from the requestor.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AccessPackage Resource

    Get an existing AccessPackage 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?: AccessPackageState, opts?: CustomResourceOptions): AccessPackage
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            catalog_id: Optional[str] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            hidden: Optional[bool] = None) -> AccessPackage
    func GetAccessPackage(ctx *Context, name string, id IDInput, state *AccessPackageState, opts ...ResourceOption) (*AccessPackage, error)
    public static AccessPackage Get(string name, Input<string> id, AccessPackageState? state, CustomResourceOptions? opts = null)
    public static AccessPackage get(String name, Output<String> id, AccessPackageState 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:
    CatalogId string
    The ID of the Catalog this access package will be created in.
    Description string
    The description of the access package.
    DisplayName string
    The display name of the access package.
    Hidden bool
    Whether the access package is hidden from the requestor.
    CatalogId string
    The ID of the Catalog this access package will be created in.
    Description string
    The description of the access package.
    DisplayName string
    The display name of the access package.
    Hidden bool
    Whether the access package is hidden from the requestor.
    catalogId String
    The ID of the Catalog this access package will be created in.
    description String
    The description of the access package.
    displayName String
    The display name of the access package.
    hidden Boolean
    Whether the access package is hidden from the requestor.
    catalogId string
    The ID of the Catalog this access package will be created in.
    description string
    The description of the access package.
    displayName string
    The display name of the access package.
    hidden boolean
    Whether the access package is hidden from the requestor.
    catalog_id str
    The ID of the Catalog this access package will be created in.
    description str
    The description of the access package.
    display_name str
    The display name of the access package.
    hidden bool
    Whether the access package is hidden from the requestor.
    catalogId String
    The ID of the Catalog this access package will be created in.
    description String
    The description of the access package.
    displayName String
    The display name of the access package.
    hidden Boolean
    Whether the access package is hidden from the requestor.

    Import

    Access Packages can be imported using the id, e.g.

    $ pulumi import azuread:index/accessPackage:AccessPackage example_package 00000000-0000-0000-0000-000000000000
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.48.0 published on Monday, Apr 15, 2024 by Pulumi