AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi
aws.directoryservice.getDirectory
Explore with Pulumi AI
Get attributes of AWS Directory Service directory (SimpleAD, Managed AD, AD Connector). It’s especially useful to refer AWS Managed AD or on-premise AD in AD Connector configuration.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.directoryservice.getDirectory({
    directoryId: main.id,
});
import pulumi
import pulumi_aws as aws
example = aws.directoryservice.get_directory(directory_id=main["id"])
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directoryservice"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := directoryservice.LookupDirectory(ctx, &directoryservice.LookupDirectoryArgs{
			DirectoryId: main.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = Aws.DirectoryService.GetDirectory.Invoke(new()
    {
        DirectoryId = main.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.directoryservice.DirectoryserviceFunctions;
import com.pulumi.aws.directoryservice.inputs.GetDirectoryArgs;
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 = DirectoryserviceFunctions.getDirectory(GetDirectoryArgs.builder()
            .directoryId(main.id())
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: aws:directoryservice:getDirectory
      arguments:
        directoryId: ${main.id}
Using getDirectory
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 getDirectory(args: GetDirectoryArgs, opts?: InvokeOptions): Promise<GetDirectoryResult>
function getDirectoryOutput(args: GetDirectoryOutputArgs, opts?: InvokeOptions): Output<GetDirectoryResult>def get_directory(directory_id: Optional[str] = None,
                  tags: Optional[Mapping[str, str]] = None,
                  opts: Optional[InvokeOptions] = None) -> GetDirectoryResult
def get_directory_output(directory_id: Optional[pulumi.Input[str]] = None,
                  tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetDirectoryResult]func LookupDirectory(ctx *Context, args *LookupDirectoryArgs, opts ...InvokeOption) (*LookupDirectoryResult, error)
func LookupDirectoryOutput(ctx *Context, args *LookupDirectoryOutputArgs, opts ...InvokeOption) LookupDirectoryResultOutput> Note: This function is named LookupDirectory in the Go SDK.
public static class GetDirectory 
{
    public static Task<GetDirectoryResult> InvokeAsync(GetDirectoryArgs args, InvokeOptions? opts = null)
    public static Output<GetDirectoryResult> Invoke(GetDirectoryInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDirectoryResult> getDirectory(GetDirectoryArgs args, InvokeOptions options)
public static Output<GetDirectoryResult> getDirectory(GetDirectoryArgs args, InvokeOptions options)
fn::invoke:
  function: aws:directoryservice/getDirectory:getDirectory
  arguments:
    # arguments dictionaryThe following arguments are supported:
- DirectoryId string
- ID of the directory.
- Dictionary<string, string>
- A map of tags assigned to the directory/connector.
- DirectoryId string
- ID of the directory.
- map[string]string
- A map of tags assigned to the directory/connector.
- directoryId String
- ID of the directory.
- Map<String,String>
- A map of tags assigned to the directory/connector.
- directoryId string
- ID of the directory.
- {[key: string]: string}
- A map of tags assigned to the directory/connector.
- directory_id str
- ID of the directory.
- Mapping[str, str]
- A map of tags assigned to the directory/connector.
- directoryId String
- ID of the directory.
- Map<String>
- A map of tags assigned to the directory/connector.
getDirectory Result
The following output properties are available:
- AccessUrl string
- Access URL for the directory/connector, such as http://alias.awsapps.com.
- Alias string
- Alias for the directory/connector, such as d-991708b282.awsapps.com.
- ConnectSettings List<GetDirectory Connect Setting> 
- Description string
- Textual description for the directory/connector.
- DirectoryId string
- DnsIp List<string>Addresses 
- List of IP addresses of the DNS servers for the directory/connector.
- Edition string
- (for MicrosoftAD) Microsoft AD edition (StandardorEnterprise).
- EnableSso bool
- Directory/connector single-sign on status.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Fully qualified name for the directory/connector.
- RadiusSettings List<GetDirectory Radius Setting> 
- SecurityGroup stringId 
- ID of the security group created by the directory/connector.
- ShortName string
- Short name of the directory/connector, such as CORP.
- Size string
- (for SimpleADandADConnector) Size of the directory/connector (SmallorLarge).
- Dictionary<string, string>
- A map of tags assigned to the directory/connector.
- Type string
- Directory type (SimpleAD,ADConnectororMicrosoftAD).
- VpcSettings List<GetDirectory Vpc Setting> 
- AccessUrl string
- Access URL for the directory/connector, such as http://alias.awsapps.com.
- Alias string
- Alias for the directory/connector, such as d-991708b282.awsapps.com.
- ConnectSettings []GetDirectory Connect Setting 
- Description string
- Textual description for the directory/connector.
- DirectoryId string
- DnsIp []stringAddresses 
- List of IP addresses of the DNS servers for the directory/connector.
- Edition string
- (for MicrosoftAD) Microsoft AD edition (StandardorEnterprise).
- EnableSso bool
- Directory/connector single-sign on status.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Fully qualified name for the directory/connector.
- RadiusSettings []GetDirectory Radius Setting 
- SecurityGroup stringId 
- ID of the security group created by the directory/connector.
- ShortName string
- Short name of the directory/connector, such as CORP.
- Size string
- (for SimpleADandADConnector) Size of the directory/connector (SmallorLarge).
- map[string]string
- A map of tags assigned to the directory/connector.
- Type string
- Directory type (SimpleAD,ADConnectororMicrosoftAD).
- VpcSettings []GetDirectory Vpc Setting 
- accessUrl String
- Access URL for the directory/connector, such as http://alias.awsapps.com.
- alias String
- Alias for the directory/connector, such as d-991708b282.awsapps.com.
- connectSettings List<GetDirectory Connect Setting> 
- description String
- Textual description for the directory/connector.
- directoryId String
- dnsIp List<String>Addresses 
- List of IP addresses of the DNS servers for the directory/connector.
- edition String
- (for MicrosoftAD) Microsoft AD edition (StandardorEnterprise).
- enableSso Boolean
- Directory/connector single-sign on status.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Fully qualified name for the directory/connector.
- radiusSettings List<GetDirectory Radius Setting> 
- securityGroup StringId 
- ID of the security group created by the directory/connector.
- shortName String
- Short name of the directory/connector, such as CORP.
- size String
- (for SimpleADandADConnector) Size of the directory/connector (SmallorLarge).
- Map<String,String>
- A map of tags assigned to the directory/connector.
- type String
- Directory type (SimpleAD,ADConnectororMicrosoftAD).
- vpcSettings List<GetDirectory Vpc Setting> 
- accessUrl string
- Access URL for the directory/connector, such as http://alias.awsapps.com.
- alias string
- Alias for the directory/connector, such as d-991708b282.awsapps.com.
- connectSettings GetDirectory Connect Setting[] 
- description string
- Textual description for the directory/connector.
- directoryId string
- dnsIp string[]Addresses 
- List of IP addresses of the DNS servers for the directory/connector.
- edition string
- (for MicrosoftAD) Microsoft AD edition (StandardorEnterprise).
- enableSso boolean
- Directory/connector single-sign on status.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Fully qualified name for the directory/connector.
- radiusSettings GetDirectory Radius Setting[] 
- securityGroup stringId 
- ID of the security group created by the directory/connector.
- shortName string
- Short name of the directory/connector, such as CORP.
- size string
- (for SimpleADandADConnector) Size of the directory/connector (SmallorLarge).
- {[key: string]: string}
- A map of tags assigned to the directory/connector.
- type string
- Directory type (SimpleAD,ADConnectororMicrosoftAD).
- vpcSettings GetDirectory Vpc Setting[] 
- access_url str
- Access URL for the directory/connector, such as http://alias.awsapps.com.
- alias str
- Alias for the directory/connector, such as d-991708b282.awsapps.com.
- connect_settings Sequence[GetDirectory Connect Setting] 
- description str
- Textual description for the directory/connector.
- directory_id str
- dns_ip_ Sequence[str]addresses 
- List of IP addresses of the DNS servers for the directory/connector.
- edition str
- (for MicrosoftAD) Microsoft AD edition (StandardorEnterprise).
- enable_sso bool
- Directory/connector single-sign on status.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Fully qualified name for the directory/connector.
- radius_settings Sequence[GetDirectory Radius Setting] 
- security_group_ strid 
- ID of the security group created by the directory/connector.
- short_name str
- Short name of the directory/connector, such as CORP.
- size str
- (for SimpleADandADConnector) Size of the directory/connector (SmallorLarge).
- Mapping[str, str]
- A map of tags assigned to the directory/connector.
- type str
- Directory type (SimpleAD,ADConnectororMicrosoftAD).
- vpc_settings Sequence[GetDirectory Vpc Setting] 
- accessUrl String
- Access URL for the directory/connector, such as http://alias.awsapps.com.
- alias String
- Alias for the directory/connector, such as d-991708b282.awsapps.com.
- connectSettings List<Property Map>
- description String
- Textual description for the directory/connector.
- directoryId String
- dnsIp List<String>Addresses 
- List of IP addresses of the DNS servers for the directory/connector.
- edition String
- (for MicrosoftAD) Microsoft AD edition (StandardorEnterprise).
- enableSso Boolean
- Directory/connector single-sign on status.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Fully qualified name for the directory/connector.
- radiusSettings List<Property Map>
- securityGroup StringId 
- ID of the security group created by the directory/connector.
- shortName String
- Short name of the directory/connector, such as CORP.
- size String
- (for SimpleADandADConnector) Size of the directory/connector (SmallorLarge).
- Map<String>
- A map of tags assigned to the directory/connector.
- type String
- Directory type (SimpleAD,ADConnectororMicrosoftAD).
- vpcSettings List<Property Map>
Supporting Types
GetDirectoryConnectSetting   
- AvailabilityZones List<string>
- ConnectIps List<string>
- IP addresses of the AD Connector servers.
- CustomerDns List<string>Ips 
- DNS IP addresses of the domain to connect to.
- CustomerUsername string
- Username corresponding to the password provided.
- SubnetIds List<string>
- Identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- VpcId string
- ID of the VPC that the connector is in.
- AvailabilityZones []string
- ConnectIps []string
- IP addresses of the AD Connector servers.
- CustomerDns []stringIps 
- DNS IP addresses of the domain to connect to.
- CustomerUsername string
- Username corresponding to the password provided.
- SubnetIds []string
- Identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- VpcId string
- ID of the VPC that the connector is in.
- availabilityZones List<String>
- connectIps List<String>
- IP addresses of the AD Connector servers.
- customerDns List<String>Ips 
- DNS IP addresses of the domain to connect to.
- customerUsername String
- Username corresponding to the password provided.
- subnetIds List<String>
- Identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- vpcId String
- ID of the VPC that the connector is in.
- availabilityZones string[]
- connectIps string[]
- IP addresses of the AD Connector servers.
- customerDns string[]Ips 
- DNS IP addresses of the domain to connect to.
- customerUsername string
- Username corresponding to the password provided.
- subnetIds string[]
- Identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- vpcId string
- ID of the VPC that the connector is in.
- availability_zones Sequence[str]
- connect_ips Sequence[str]
- IP addresses of the AD Connector servers.
- customer_dns_ Sequence[str]ips 
- DNS IP addresses of the domain to connect to.
- customer_username str
- Username corresponding to the password provided.
- subnet_ids Sequence[str]
- Identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- vpc_id str
- ID of the VPC that the connector is in.
- availabilityZones List<String>
- connectIps List<String>
- IP addresses of the AD Connector servers.
- customerDns List<String>Ips 
- DNS IP addresses of the domain to connect to.
- customerUsername String
- Username corresponding to the password provided.
- subnetIds List<String>
- Identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- vpcId String
- ID of the VPC that the connector is in.
GetDirectoryRadiusSetting   
- AuthenticationProtocol string
- The protocol specified for your RADIUS endpoints.
- DisplayLabel string
- Display label.
- RadiusPort int
- Port that your RADIUS server is using for communications.
- RadiusRetries int
- Maximum number of times that communication with the RADIUS server is attempted.
- RadiusServers List<string>
- Set of strings that contains the fully qualified domain name (FQDN) or IP addresses of the RADIUS server endpoints, or the FQDN or IP addresses of your RADIUS server load balancer.
- RadiusTimeout int
- Amount of time, in seconds, to wait for the RADIUS server to respond.
- UseSame boolUsername 
- Not currently used.
- AuthenticationProtocol string
- The protocol specified for your RADIUS endpoints.
- DisplayLabel string
- Display label.
- RadiusPort int
- Port that your RADIUS server is using for communications.
- RadiusRetries int
- Maximum number of times that communication with the RADIUS server is attempted.
- RadiusServers []string
- Set of strings that contains the fully qualified domain name (FQDN) or IP addresses of the RADIUS server endpoints, or the FQDN or IP addresses of your RADIUS server load balancer.
- RadiusTimeout int
- Amount of time, in seconds, to wait for the RADIUS server to respond.
- UseSame boolUsername 
- Not currently used.
- authenticationProtocol String
- The protocol specified for your RADIUS endpoints.
- displayLabel String
- Display label.
- radiusPort Integer
- Port that your RADIUS server is using for communications.
- radiusRetries Integer
- Maximum number of times that communication with the RADIUS server is attempted.
- radiusServers List<String>
- Set of strings that contains the fully qualified domain name (FQDN) or IP addresses of the RADIUS server endpoints, or the FQDN or IP addresses of your RADIUS server load balancer.
- radiusTimeout Integer
- Amount of time, in seconds, to wait for the RADIUS server to respond.
- useSame BooleanUsername 
- Not currently used.
- authenticationProtocol string
- The protocol specified for your RADIUS endpoints.
- displayLabel string
- Display label.
- radiusPort number
- Port that your RADIUS server is using for communications.
- radiusRetries number
- Maximum number of times that communication with the RADIUS server is attempted.
- radiusServers string[]
- Set of strings that contains the fully qualified domain name (FQDN) or IP addresses of the RADIUS server endpoints, or the FQDN or IP addresses of your RADIUS server load balancer.
- radiusTimeout number
- Amount of time, in seconds, to wait for the RADIUS server to respond.
- useSame booleanUsername 
- Not currently used.
- authentication_protocol str
- The protocol specified for your RADIUS endpoints.
- display_label str
- Display label.
- radius_port int
- Port that your RADIUS server is using for communications.
- radius_retries int
- Maximum number of times that communication with the RADIUS server is attempted.
- radius_servers Sequence[str]
- Set of strings that contains the fully qualified domain name (FQDN) or IP addresses of the RADIUS server endpoints, or the FQDN or IP addresses of your RADIUS server load balancer.
- radius_timeout int
- Amount of time, in seconds, to wait for the RADIUS server to respond.
- use_same_ boolusername 
- Not currently used.
- authenticationProtocol String
- The protocol specified for your RADIUS endpoints.
- displayLabel String
- Display label.
- radiusPort Number
- Port that your RADIUS server is using for communications.
- radiusRetries Number
- Maximum number of times that communication with the RADIUS server is attempted.
- radiusServers List<String>
- Set of strings that contains the fully qualified domain name (FQDN) or IP addresses of the RADIUS server endpoints, or the FQDN or IP addresses of your RADIUS server load balancer.
- radiusTimeout Number
- Amount of time, in seconds, to wait for the RADIUS server to respond.
- useSame BooleanUsername 
- Not currently used.
GetDirectoryVpcSetting   
- AvailabilityZones List<string>
- SubnetIds List<string>
- Identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- VpcId string
- ID of the VPC that the connector is in.
- AvailabilityZones []string
- SubnetIds []string
- Identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- VpcId string
- ID of the VPC that the connector is in.
- availabilityZones List<String>
- subnetIds List<String>
- Identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- vpcId String
- ID of the VPC that the connector is in.
- availabilityZones string[]
- subnetIds string[]
- Identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- vpcId string
- ID of the VPC that the connector is in.
- availability_zones Sequence[str]
- subnet_ids Sequence[str]
- Identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- vpc_id str
- ID of the VPC that the connector is in.
- availabilityZones List<String>
- subnetIds List<String>
- Identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- vpcId String
- ID of the VPC that the connector is in.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.