AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.10.0 published on Monday, Jul 11, 2022 by Pulumi

getDirectory

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

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.DirectoryService.GetDirectory.InvokeAsync(new Aws.DirectoryService.GetDirectoryArgs
        {
            DirectoryId = aws_directory_service_directory.Main.Id,
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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: aws_directory_service_directory.Main.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(DirectoryserviceFunctions.getDirectory(GetDirectoryArgs.builder()
            .directoryId(aws_directory_service_directory.main().id())
            .build()));

    }
}
import pulumi
import pulumi_aws as aws

example = aws.directoryservice.get_directory(directory_id=aws_directory_service_directory["main"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.directoryservice.getDirectory({
    directoryId: aws_directory_service_directory.main.id,
});
variables:
  example:
    Fn::Invoke:
      Function: aws:directoryservice:getDirectory
      Arguments:
        directoryId: ${aws_directory_service_directory.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)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:directoryservice/getDirectory:getDirectory
  Arguments:
    # Arguments dictionary

The following arguments are supported:

DirectoryId string

The ID of the directory.

Tags Dictionary<string, string>

A map of tags assigned to the directory/connector.

DirectoryId string

The ID of the directory.

Tags map[string]string

A map of tags assigned to the directory/connector.

directoryId String

The ID of the directory.

tags Map<String,String>

A map of tags assigned to the directory/connector.

directoryId string

The ID of the directory.

tags {[key: string]: string}

A map of tags assigned to the directory/connector.

directory_id str

The ID of the directory.

tags Mapping[str, str]

A map of tags assigned to the directory/connector.

directoryId String

The ID of the directory.

tags Map<String>

A map of tags assigned to the directory/connector.

getDirectory Result

The following output properties are available:

AccessUrl string

The access URL for the directory/connector, such as http://alias.awsapps.com.

Alias string

The alias for the directory/connector, such as d-991708b282.awsapps.com.

ConnectSettings List<GetDirectoryConnectSetting>
Description string

A textual description for the directory/connector.

DirectoryId string
DnsIpAddresses List<string>

A list of IP addresses of the DNS servers for the directory/connector.

Edition string

(for MicrosoftAD) The Microsoft AD edition (Standard or Enterprise).

EnableSso bool

The directory/connector single-sign on status.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The fully qualified name for the directory/connector.

SecurityGroupId string

The ID of the security group created by the directory/connector.

ShortName string

The short name of the directory/connector, such as CORP.

Size string

(for SimpleAD and ADConnector) The size of the directory/connector (Small or Large).

Type string

The directory type (SimpleAD, ADConnector or MicrosoftAD).

VpcSettings List<GetDirectoryVpcSetting>
Tags Dictionary<string, string>

A map of tags assigned to the directory/connector.

AccessUrl string

The access URL for the directory/connector, such as http://alias.awsapps.com.

Alias string

The alias for the directory/connector, such as d-991708b282.awsapps.com.

ConnectSettings []GetDirectoryConnectSetting
Description string

A textual description for the directory/connector.

DirectoryId string
DnsIpAddresses []string

A list of IP addresses of the DNS servers for the directory/connector.

Edition string

(for MicrosoftAD) The Microsoft AD edition (Standard or Enterprise).

EnableSso bool

The directory/connector single-sign on status.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The fully qualified name for the directory/connector.

SecurityGroupId string

The ID of the security group created by the directory/connector.

ShortName string

The short name of the directory/connector, such as CORP.

Size string

(for SimpleAD and ADConnector) The size of the directory/connector (Small or Large).

Type string

The directory type (SimpleAD, ADConnector or MicrosoftAD).

VpcSettings []GetDirectoryVpcSetting
Tags map[string]string

A map of tags assigned to the directory/connector.

accessUrl String

The access URL for the directory/connector, such as http://alias.awsapps.com.

alias String

The alias for the directory/connector, such as d-991708b282.awsapps.com.

connectSettings List<GetDirectoryConnectSetting>
description String

A textual description for the directory/connector.

directoryId String
dnsIpAddresses List<String>

A list of IP addresses of the DNS servers for the directory/connector.

edition String

(for MicrosoftAD) The Microsoft AD edition (Standard or Enterprise).

enableSso Boolean

The directory/connector single-sign on status.

id String

The provider-assigned unique ID for this managed resource.

name String

The fully qualified name for the directory/connector.

securityGroupId String

The ID of the security group created by the directory/connector.

shortName String

The short name of the directory/connector, such as CORP.

size String

(for SimpleAD and ADConnector) The size of the directory/connector (Small or Large).

type String

The directory type (SimpleAD, ADConnector or MicrosoftAD).

vpcSettings List<GetDirectoryVpcSetting>
tags Map<String,String>

A map of tags assigned to the directory/connector.

accessUrl string

The access URL for the directory/connector, such as http://alias.awsapps.com.

alias string

The alias for the directory/connector, such as d-991708b282.awsapps.com.

connectSettings GetDirectoryConnectSetting[]
description string

A textual description for the directory/connector.

directoryId string
dnsIpAddresses string[]

A list of IP addresses of the DNS servers for the directory/connector.

edition string

(for MicrosoftAD) The Microsoft AD edition (Standard or Enterprise).

enableSso boolean

The directory/connector single-sign on status.

id string

The provider-assigned unique ID for this managed resource.

name string

The fully qualified name for the directory/connector.

securityGroupId string

The ID of the security group created by the directory/connector.

shortName string

The short name of the directory/connector, such as CORP.

size string

(for SimpleAD and ADConnector) The size of the directory/connector (Small or Large).

type string

The directory type (SimpleAD, ADConnector or MicrosoftAD).

vpcSettings GetDirectoryVpcSetting[]
tags {[key: string]: string}

A map of tags assigned to the directory/connector.

access_url str

The access URL for the directory/connector, such as http://alias.awsapps.com.

alias str

The alias for the directory/connector, such as d-991708b282.awsapps.com.

connect_settings Sequence[GetDirectoryConnectSetting]
description str

A textual description for the directory/connector.

directory_id str
dns_ip_addresses Sequence[str]

A list of IP addresses of the DNS servers for the directory/connector.

edition str

(for MicrosoftAD) The Microsoft AD edition (Standard or Enterprise).

enable_sso bool

The directory/connector single-sign on status.

id str

The provider-assigned unique ID for this managed resource.

name str

The fully qualified name for the directory/connector.

security_group_id str

The ID of the security group created by the directory/connector.

short_name str

The short name of the directory/connector, such as CORP.

size str

(for SimpleAD and ADConnector) The size of the directory/connector (Small or Large).

type str

The directory type (SimpleAD, ADConnector or MicrosoftAD).

vpc_settings Sequence[GetDirectoryVpcSetting]
tags Mapping[str, str]

A map of tags assigned to the directory/connector.

accessUrl String

The access URL for the directory/connector, such as http://alias.awsapps.com.

alias String

The alias for the directory/connector, such as d-991708b282.awsapps.com.

connectSettings List<Property Map>
description String

A textual description for the directory/connector.

directoryId String
dnsIpAddresses List<String>

A list of IP addresses of the DNS servers for the directory/connector.

edition String

(for MicrosoftAD) The Microsoft AD edition (Standard or Enterprise).

enableSso Boolean

The directory/connector single-sign on status.

id String

The provider-assigned unique ID for this managed resource.

name String

The fully qualified name for the directory/connector.

securityGroupId String

The ID of the security group created by the directory/connector.

shortName String

The short name of the directory/connector, such as CORP.

size String

(for SimpleAD and ADConnector) The size of the directory/connector (Small or Large).

type String

The directory type (SimpleAD, ADConnector or MicrosoftAD).

vpcSettings List<Property Map>
tags Map<String>

A map of tags assigned to the directory/connector.

Supporting Types

GetDirectoryConnectSetting

AvailabilityZones List<string>
ConnectIps List<string>

The IP addresses of the AD Connector servers.

CustomerDnsIps List<string>

The DNS IP addresses of the domain to connect to.

CustomerUsername string

The username corresponding to the password provided.

SubnetIds List<string>

The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).

VpcId string

The ID of the VPC that the connector is in.

AvailabilityZones []string
ConnectIps []string

The IP addresses of the AD Connector servers.

CustomerDnsIps []string

The DNS IP addresses of the domain to connect to.

CustomerUsername string

The username corresponding to the password provided.

SubnetIds []string

The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).

VpcId string

The ID of the VPC that the connector is in.

availabilityZones List<String>
connectIps List<String>

The IP addresses of the AD Connector servers.

customerDnsIps List<String>

The DNS IP addresses of the domain to connect to.

customerUsername String

The username corresponding to the password provided.

subnetIds List<String>

The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).

vpcId String

The ID of the VPC that the connector is in.

availabilityZones string[]
connectIps string[]

The IP addresses of the AD Connector servers.

customerDnsIps string[]

The DNS IP addresses of the domain to connect to.

customerUsername string

The username corresponding to the password provided.

subnetIds string[]

The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).

vpcId string

The ID of the VPC that the connector is in.

availability_zones Sequence[str]
connect_ips Sequence[str]

The IP addresses of the AD Connector servers.

customer_dns_ips Sequence[str]

The DNS IP addresses of the domain to connect to.

customer_username str

The username corresponding to the password provided.

subnet_ids Sequence[str]

The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).

vpc_id str

The ID of the VPC that the connector is in.

availabilityZones List<String>
connectIps List<String>

The IP addresses of the AD Connector servers.

customerDnsIps List<String>

The DNS IP addresses of the domain to connect to.

customerUsername String

The username corresponding to the password provided.

subnetIds List<String>

The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).

vpcId String

The ID of the VPC that the connector is in.

GetDirectoryVpcSetting

AvailabilityZones List<string>
SubnetIds List<string>

The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).

VpcId string

The ID of the VPC that the connector is in.

AvailabilityZones []string
SubnetIds []string

The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).

VpcId string

The ID of the VPC that the connector is in.

availabilityZones List<String>
subnetIds List<String>

The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).

vpcId String

The ID of the VPC that the connector is in.

availabilityZones string[]
subnetIds string[]

The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).

vpcId string

The ID of the VPC that the connector is in.

availability_zones Sequence[str]
subnet_ids Sequence[str]

The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).

vpc_id str

The ID of the VPC that the connector is in.

availabilityZones List<String>
subnetIds List<String>

The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).

vpcId String

The ID of the VPC that the connector is in.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.