1. Packages
  2. Azure Active Directory (Azure AD)
  3. API Docs
  4. getAccessPackage
Azure Active Directory (Azure AD) v5.47.1 published on Friday, Feb 9, 2024 by Pulumi

azuread.getAccessPackage

Explore with Pulumi AI

azuread logo
Azure Active Directory (Azure AD) v5.47.1 published on Friday, Feb 9, 2024 by Pulumi

    Use this data source to retrieve information for an existing access package within Identity Governance in Azure Active Directory.

    API Permissions

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

    When authenticated with a service principal, this data source requires one of the following application roles: EntitlementManagement.Read.All, or EntitlementManagement.ReadWrite.All.

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

    Example Usage

    Look up by ID

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureAD = Pulumi.AzureAD;
    
    return await Deployment.RunAsync(() => 
    {
        var example = AzureAD.GetAccessPackage.Invoke(new()
        {
            ObjectId = "00000000-0000-0000-0000-000000000000",
        });
    
    });
    
    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.LookupAccessPackage(ctx, &azuread.LookupAccessPackageArgs{
    			ObjectId: pulumi.StringRef("00000000-0000-0000-0000-000000000000"),
    		}, nil)
    		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.AzureadFunctions;
    import com.pulumi.azuread.inputs.GetAccessPackageArgs;
    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) {
            final var example = AzureadFunctions.getAccessPackage(GetAccessPackageArgs.builder()
                .objectId("00000000-0000-0000-0000-000000000000")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azuread as azuread
    
    example = azuread.get_access_package(object_id="00000000-0000-0000-0000-000000000000")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azuread from "@pulumi/azuread";
    
    const example = azuread.getAccessPackage({
        objectId: "00000000-0000-0000-0000-000000000000",
    });
    
    variables:
      example:
        fn::invoke:
          Function: azuread:getAccessPackage
          Arguments:
            objectId: 00000000-0000-0000-0000-000000000000
    

    Look up by DisplayName

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureAD = Pulumi.AzureAD;
    
    return await Deployment.RunAsync(() => 
    {
        var example = AzureAD.GetAccessPackage.Invoke(new()
        {
            CatalogId = "00000000-0000-0000-0000-000000000000",
            DisplayName = "My access package Catalog",
        });
    
    });
    
    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.LookupAccessPackage(ctx, &azuread.LookupAccessPackageArgs{
    			CatalogId:   pulumi.StringRef("00000000-0000-0000-0000-000000000000"),
    			DisplayName: pulumi.StringRef("My access package Catalog"),
    		}, nil)
    		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.AzureadFunctions;
    import com.pulumi.azuread.inputs.GetAccessPackageArgs;
    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) {
            final var example = AzureadFunctions.getAccessPackage(GetAccessPackageArgs.builder()
                .catalogId("00000000-0000-0000-0000-000000000000")
                .displayName("My access package Catalog")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azuread as azuread
    
    example = azuread.get_access_package(catalog_id="00000000-0000-0000-0000-000000000000",
        display_name="My access package Catalog")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azuread from "@pulumi/azuread";
    
    const example = azuread.getAccessPackage({
        catalogId: "00000000-0000-0000-0000-000000000000",
        displayName: "My access package Catalog",
    });
    
    variables:
      example:
        fn::invoke:
          Function: azuread:getAccessPackage
          Arguments:
            catalogId: 00000000-0000-0000-0000-000000000000
            displayName: My access package Catalog
    

    Using getAccessPackage

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getAccessPackage(args: GetAccessPackageArgs, opts?: InvokeOptions): Promise<GetAccessPackageResult>
    function getAccessPackageOutput(args: GetAccessPackageOutputArgs, opts?: InvokeOptions): Output<GetAccessPackageResult>
    def get_access_package(catalog_id: Optional[str] = None,
                           display_name: Optional[str] = None,
                           object_id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetAccessPackageResult
    def get_access_package_output(catalog_id: Optional[pulumi.Input[str]] = None,
                           display_name: Optional[pulumi.Input[str]] = None,
                           object_id: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetAccessPackageResult]
    func LookupAccessPackage(ctx *Context, args *LookupAccessPackageArgs, opts ...InvokeOption) (*LookupAccessPackageResult, error)
    func LookupAccessPackageOutput(ctx *Context, args *LookupAccessPackageOutputArgs, opts ...InvokeOption) LookupAccessPackageResultOutput

    > Note: This function is named LookupAccessPackage in the Go SDK.

    public static class GetAccessPackage 
    {
        public static Task<GetAccessPackageResult> InvokeAsync(GetAccessPackageArgs args, InvokeOptions? opts = null)
        public static Output<GetAccessPackageResult> Invoke(GetAccessPackageInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAccessPackageResult> getAccessPackage(GetAccessPackageArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azuread:index/getAccessPackage:getAccessPackage
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CatalogId string
    The ID of the Catalog this access package is in.
    DisplayName string
    The display name of the access package.
    ObjectId string

    The ID of this access package.

    Either object_id, or both catalog_id and display_name, must be specified.

    CatalogId string
    The ID of the Catalog this access package is in.
    DisplayName string
    The display name of the access package.
    ObjectId string

    The ID of this access package.

    Either object_id, or both catalog_id and display_name, must be specified.

    catalogId String
    The ID of the Catalog this access package is in.
    displayName String
    The display name of the access package.
    objectId String

    The ID of this access package.

    Either object_id, or both catalog_id and display_name, must be specified.

    catalogId string
    The ID of the Catalog this access package is in.
    displayName string
    The display name of the access package.
    objectId string

    The ID of this access package.

    Either object_id, or both catalog_id and display_name, must be specified.

    catalog_id str
    The ID of the Catalog this access package is in.
    display_name str
    The display name of the access package.
    object_id str

    The ID of this access package.

    Either object_id, or both catalog_id and display_name, must be specified.

    catalogId String
    The ID of the Catalog this access package is in.
    displayName String
    The display name of the access package.
    objectId String

    The ID of this access package.

    Either object_id, or both catalog_id and display_name, must be specified.

    getAccessPackage Result

    The following output properties are available:

    Description string
    The description of the access package.
    DisplayName string
    Hidden bool
    Whether the access package is hidden from the requestor.
    Id string
    The provider-assigned unique ID for this managed resource.
    ObjectId string
    CatalogId string
    Description string
    The description of the access package.
    DisplayName string
    Hidden bool
    Whether the access package is hidden from the requestor.
    Id string
    The provider-assigned unique ID for this managed resource.
    ObjectId string
    CatalogId string
    description String
    The description of the access package.
    displayName String
    hidden Boolean
    Whether the access package is hidden from the requestor.
    id String
    The provider-assigned unique ID for this managed resource.
    objectId String
    catalogId String
    description string
    The description of the access package.
    displayName string
    hidden boolean
    Whether the access package is hidden from the requestor.
    id string
    The provider-assigned unique ID for this managed resource.
    objectId string
    catalogId string
    description str
    The description of the access package.
    display_name str
    hidden bool
    Whether the access package is hidden from the requestor.
    id str
    The provider-assigned unique ID for this managed resource.
    object_id str
    catalog_id str
    description String
    The description of the access package.
    displayName String
    hidden Boolean
    Whether the access package is hidden from the requestor.
    id String
    The provider-assigned unique ID for this managed resource.
    objectId String
    catalogId String

    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.1 published on Friday, Feb 9, 2024 by Pulumi