UNPKG

@pulumi/azuread

Version:

A Pulumi package for creating and managing Azure Active Directory (Azure AD) cloud resources.

78 lines 3.08 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getGroupRoleManagementPolicyOutput = exports.getGroupRoleManagementPolicy = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Use this data source to retrieve a role policy for an Azure AD group. * * ## API Permissions * * The following API permissions are required in order to use this resource. * * When authenticated with a service principal, this resource requires the `RoleManagementPolicy.Read.AzureADGroup` Microsoft Graph API permissions. * * When authenticated with a user principal, this resource requires `Global Administrator` directory role, or the `Privileged Role Administrator` role in Identity Governance. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * * const example = new azuread.Group("example", { * displayName: "group-name", * securityEnabled: true, * }); * const ownersPolicy = azuread.getGroupRoleManagementPolicyOutput({ * groupId: example.id, * roleId: "owner", * }); * ``` */ function getGroupRoleManagementPolicy(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("azuread:index/getGroupRoleManagementPolicy:getGroupRoleManagementPolicy", { "groupId": args.groupId, "roleId": args.roleId, }, opts); } exports.getGroupRoleManagementPolicy = getGroupRoleManagementPolicy; /** * Use this data source to retrieve a role policy for an Azure AD group. * * ## API Permissions * * The following API permissions are required in order to use this resource. * * When authenticated with a service principal, this resource requires the `RoleManagementPolicy.Read.AzureADGroup` Microsoft Graph API permissions. * * When authenticated with a user principal, this resource requires `Global Administrator` directory role, or the `Privileged Role Administrator` role in Identity Governance. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * * const example = new azuread.Group("example", { * displayName: "group-name", * securityEnabled: true, * }); * const ownersPolicy = azuread.getGroupRoleManagementPolicyOutput({ * groupId: example.id, * roleId: "owner", * }); * ``` */ function getGroupRoleManagementPolicyOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("azuread:index/getGroupRoleManagementPolicy:getGroupRoleManagementPolicy", { "groupId": args.groupId, "roleId": args.roleId, }, opts); } exports.getGroupRoleManagementPolicyOutput = getGroupRoleManagementPolicyOutput; //# sourceMappingURL=getGroupRoleManagementPolicy.js.map