AWS Classic
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:
- Directory
Id string The ID of the directory.
- Dictionary<string, string>
A map of tags assigned to the directory/connector.
- Directory
Id string The ID of the directory.
- map[string]string
A map of tags assigned to the directory/connector.
- directory
Id String The ID of the directory.
- Map<String,String>
A map of tags assigned to the directory/connector.
- directory
Id string The ID of the directory.
- {[key: string]: string}
A map of tags assigned to the directory/connector.
- directory_
id str The ID of the directory.
- Mapping[str, str]
A map of tags assigned to the directory/connector.
- directory
Id String The ID of the directory.
- Map<String>
A map of tags assigned to the directory/connector.
getDirectory Result
The following output properties are available:
- Access
Url 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
.- Connect
Settings List<GetDirectory Connect Setting> - Description string
A textual description for the directory/connector.
- Directory
Id string - Dns
Ip List<string>Addresses A list of IP addresses of the DNS servers for the directory/connector.
- Edition string
(for
MicrosoftAD
) The Microsoft AD edition (Standard
orEnterprise
).- Enable
Sso 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.
- Security
Group stringId The ID of the security group created by the directory/connector.
- Short
Name string The short name of the directory/connector, such as
CORP
.- Size string
(for
SimpleAD
andADConnector
) The size of the directory/connector (Small
orLarge
).- Type string
The directory type (
SimpleAD
,ADConnector
orMicrosoftAD
).- Vpc
Settings List<GetDirectory Vpc Setting> - Dictionary<string, string>
A map of tags assigned to the directory/connector.
- Access
Url 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
.- Connect
Settings []GetDirectory Connect Setting - Description string
A textual description for the directory/connector.
- Directory
Id string - Dns
Ip []stringAddresses A list of IP addresses of the DNS servers for the directory/connector.
- Edition string
(for
MicrosoftAD
) The Microsoft AD edition (Standard
orEnterprise
).- Enable
Sso 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.
- Security
Group stringId The ID of the security group created by the directory/connector.
- Short
Name string The short name of the directory/connector, such as
CORP
.- Size string
(for
SimpleAD
andADConnector
) The size of the directory/connector (Small
orLarge
).- Type string
The directory type (
SimpleAD
,ADConnector
orMicrosoftAD
).- Vpc
Settings []GetDirectory Vpc Setting - map[string]string
A map of tags assigned to the directory/connector.
- access
Url 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
.- connect
Settings List<GetDirectory Connect Setting> - description String
A textual description for the directory/connector.
- directory
Id String - dns
Ip List<String>Addresses A list of IP addresses of the DNS servers for the directory/connector.
- edition String
(for
MicrosoftAD
) The Microsoft AD edition (Standard
orEnterprise
).- enable
Sso 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.
- security
Group StringId The ID of the security group created by the directory/connector.
- short
Name String The short name of the directory/connector, such as
CORP
.- size String
(for
SimpleAD
andADConnector
) The size of the directory/connector (Small
orLarge
).- type String
The directory type (
SimpleAD
,ADConnector
orMicrosoftAD
).- vpc
Settings List<GetDirectory Vpc Setting> - Map<String,String>
A map of tags assigned to the directory/connector.
- access
Url 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
.- connect
Settings GetDirectory Connect Setting[] - description string
A textual description for the directory/connector.
- directory
Id string - dns
Ip string[]Addresses A list of IP addresses of the DNS servers for the directory/connector.
- edition string
(for
MicrosoftAD
) The Microsoft AD edition (Standard
orEnterprise
).- enable
Sso 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.
- security
Group stringId The ID of the security group created by the directory/connector.
- short
Name string The short name of the directory/connector, such as
CORP
.- size string
(for
SimpleAD
andADConnector
) The size of the directory/connector (Small
orLarge
).- type string
The directory type (
SimpleAD
,ADConnector
orMicrosoftAD
).- vpc
Settings GetDirectory Vpc Setting[] - {[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[GetDirectory Connect Setting] - description str
A textual description for the directory/connector.
- directory_
id str - dns_
ip_ Sequence[str]addresses A list of IP addresses of the DNS servers for the directory/connector.
- edition str
(for
MicrosoftAD
) The Microsoft AD edition (Standard
orEnterprise
).- 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_ strid 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
andADConnector
) The size of the directory/connector (Small
orLarge
).- type str
The directory type (
SimpleAD
,ADConnector
orMicrosoftAD
).- vpc_
settings Sequence[GetDirectory Vpc Setting] - Mapping[str, str]
A map of tags assigned to the directory/connector.
- access
Url 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
.- connect
Settings List<Property Map> - description String
A textual description for the directory/connector.
- directory
Id String - dns
Ip List<String>Addresses A list of IP addresses of the DNS servers for the directory/connector.
- edition String
(for
MicrosoftAD
) The Microsoft AD edition (Standard
orEnterprise
).- enable
Sso 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.
- security
Group StringId The ID of the security group created by the directory/connector.
- short
Name String The short name of the directory/connector, such as
CORP
.- size String
(for
SimpleAD
andADConnector
) The size of the directory/connector (Small
orLarge
).- type String
The directory type (
SimpleAD
,ADConnector
orMicrosoftAD
).- vpc
Settings List<Property Map> - Map<String>
A map of tags assigned to the directory/connector.
Supporting Types
GetDirectoryConnectSetting
- Availability
Zones List<string> - Connect
Ips List<string> The IP addresses of the AD Connector servers.
- Customer
Dns List<string>Ips The DNS IP addresses of the domain to connect to.
- Customer
Username string The username corresponding to the password provided.
- Subnet
Ids List<string> The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- Vpc
Id string The ID of the VPC that the connector is in.
- Availability
Zones []string - Connect
Ips []string The IP addresses of the AD Connector servers.
- Customer
Dns []stringIps The DNS IP addresses of the domain to connect to.
- Customer
Username string The username corresponding to the password provided.
- Subnet
Ids []string The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- Vpc
Id string The ID of the VPC that the connector is in.
- availability
Zones List<String> - connect
Ips List<String> The IP addresses of the AD Connector servers.
- customer
Dns List<String>Ips The DNS IP addresses of the domain to connect to.
- customer
Username String The username corresponding to the password provided.
- subnet
Ids List<String> The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- vpc
Id String The ID of the VPC that the connector is in.
- availability
Zones string[] - connect
Ips string[] The IP addresses of the AD Connector servers.
- customer
Dns string[]Ips The DNS IP addresses of the domain to connect to.
- customer
Username string The username corresponding to the password provided.
- subnet
Ids string[] The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- vpc
Id 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_ Sequence[str]ips 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.
- availability
Zones List<String> - connect
Ips List<String> The IP addresses of the AD Connector servers.
- customer
Dns List<String>Ips The DNS IP addresses of the domain to connect to.
- customer
Username String The username corresponding to the password provided.
- subnet
Ids List<String> The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- vpc
Id String The ID of the VPC that the connector is in.
GetDirectoryVpcSetting
- Availability
Zones List<string> - Subnet
Ids List<string> The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- Vpc
Id string The ID of the VPC that the connector is in.
- Availability
Zones []string - Subnet
Ids []string The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- Vpc
Id string The ID of the VPC that the connector is in.
- availability
Zones List<String> - subnet
Ids List<String> The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- vpc
Id String The ID of the VPC that the connector is in.
- availability
Zones string[] - subnet
Ids string[] The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- vpc
Id 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.
- availability
Zones List<String> - subnet
Ids List<String> The identifiers of the subnets for the connector servers (2 subnets in 2 different AZs).
- vpc
Id 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.