@pulumi/azuread
Version:
A Pulumi package for creating and managing Azure Active Directory (Azure AD) cloud resources.
131 lines (130 loc) • 5.37 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "./types/output";
/**
* Use this data source to access information about existing Domains within 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: `Domain.Read.All` or `Directory.Read.All`
*
* When authenticated with a user principal, this data source does not require any additional roles.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuread from "@pulumi/azuread";
*
* const aadDomains = azuread.getDomains({});
* export const domainNames = aadDomains.then(aadDomains => aadDomains.domains.map(__item => __item.domainName));
* ```
*/
export declare function getDomains(args?: GetDomainsArgs, opts?: pulumi.InvokeOptions): Promise<GetDomainsResult>;
/**
* A collection of arguments for invoking getDomains.
*/
export interface GetDomainsArgs {
/**
* Set to `true` to only return domains whose DNS is managed by Microsoft 365. Defaults to `false`.
*/
adminManaged?: boolean;
/**
* Set to `true` if unverified Azure AD domains should be included. Defaults to `false`.
*/
includeUnverified?: boolean;
/**
* Set to `true` to only return the default domain.
*/
onlyDefault?: boolean;
/**
* Set to `true` to only return the initial domain, which is your primary Azure Active Directory tenant domain. Defaults to `false`.
*/
onlyInitial?: boolean;
/**
* Set to `true` to only return verified root domains. Excludes subdomains and unverified domains.
*/
onlyRoot?: boolean;
/**
* A list of supported services that must be supported by a domain. Possible values include `Email`, `Sharepoint`, `EmailInternalRelayOnly`, `OfficeCommunicationsOnline`, `SharePointDefaultDomain`, `FullRedelegation`, `SharePointPublic`, `OrgIdAuthentication`, `Yammer` and `Intune`.
*
* > **Note on filters** If `includeUnverified` is set to `true`, you cannot specify `onlyDefault` or `onlyInitial`. Additionally, you cannot combine `onlyDefault` with `onlyInitial`.
*/
supportsServices?: string[];
}
/**
* A collection of values returned by getDomains.
*/
export interface GetDomainsResult {
/**
* Whether the DNS for the domain is managed by Microsoft 365.
*/
readonly adminManaged?: boolean;
/**
* A list of tenant domains. Each `domain` object provides the attributes documented below.
*/
readonly domains: outputs.GetDomainsDomain[];
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly includeUnverified?: boolean;
readonly onlyDefault?: boolean;
readonly onlyInitial?: boolean;
readonly onlyRoot?: boolean;
readonly supportsServices?: string[];
}
/**
* Use this data source to access information about existing Domains within 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: `Domain.Read.All` or `Directory.Read.All`
*
* When authenticated with a user principal, this data source does not require any additional roles.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuread from "@pulumi/azuread";
*
* const aadDomains = azuread.getDomains({});
* export const domainNames = aadDomains.then(aadDomains => aadDomains.domains.map(__item => __item.domainName));
* ```
*/
export declare function getDomainsOutput(args?: GetDomainsOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetDomainsResult>;
/**
* A collection of arguments for invoking getDomains.
*/
export interface GetDomainsOutputArgs {
/**
* Set to `true` to only return domains whose DNS is managed by Microsoft 365. Defaults to `false`.
*/
adminManaged?: pulumi.Input<boolean>;
/**
* Set to `true` if unverified Azure AD domains should be included. Defaults to `false`.
*/
includeUnverified?: pulumi.Input<boolean>;
/**
* Set to `true` to only return the default domain.
*/
onlyDefault?: pulumi.Input<boolean>;
/**
* Set to `true` to only return the initial domain, which is your primary Azure Active Directory tenant domain. Defaults to `false`.
*/
onlyInitial?: pulumi.Input<boolean>;
/**
* Set to `true` to only return verified root domains. Excludes subdomains and unverified domains.
*/
onlyRoot?: pulumi.Input<boolean>;
/**
* A list of supported services that must be supported by a domain. Possible values include `Email`, `Sharepoint`, `EmailInternalRelayOnly`, `OfficeCommunicationsOnline`, `SharePointDefaultDomain`, `FullRedelegation`, `SharePointPublic`, `OrgIdAuthentication`, `Yammer` and `Intune`.
*
* > **Note on filters** If `includeUnverified` is set to `true`, you cannot specify `onlyDefault` or `onlyInitial`. Additionally, you cannot combine `onlyDefault` with `onlyInitial`.
*/
supportsServices?: pulumi.Input<pulumi.Input<string>[]>;
}