1. Packages
  2. AWS
  3. API Docs
  4. directoryservice
  5. getDirectory
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.directoryservice.getDirectory

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    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)
    // 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
    ID of the directory.
    Tags Dictionary<string, string>
    A map of tags assigned to the directory/connector.
    DirectoryId string
    ID of the directory.
    Tags map[string]string
    A map of tags assigned to the directory/connector.
    directoryId String
    ID of the directory.
    tags Map<String,String>
    A map of tags assigned to the directory/connector.
    directoryId string
    ID of the directory.
    tags {[key: string]: string}
    A map of tags assigned to the directory/connector.
    directory_id str
    ID of the directory.
    tags Mapping[str, str]
    A map of tags assigned to the directory/connector.
    directoryId String
    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
    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<GetDirectoryConnectSetting>
    Description string
    Textual description for the directory/connector.
    DirectoryId string
    DnsIpAddresses List<string>
    List of IP addresses of the DNS servers for the directory/connector.
    Edition string
    (for MicrosoftAD) Microsoft AD edition (Standard or Enterprise).
    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<GetDirectoryRadiusSetting>
    SecurityGroupId string
    ID of the security group created by the directory/connector.
    ShortName string
    Short name of the directory/connector, such as CORP.
    Size string
    (for SimpleAD and ADConnector) Size of the directory/connector (Small or Large).
    Tags Dictionary<string, string>
    A map of tags assigned to the directory/connector.
    Type string
    Directory type (SimpleAD, ADConnector or MicrosoftAD).
    VpcSettings List<GetDirectoryVpcSetting>
    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 []GetDirectoryConnectSetting
    Description string
    Textual description for the directory/connector.
    DirectoryId string
    DnsIpAddresses []string
    List of IP addresses of the DNS servers for the directory/connector.
    Edition string
    (for MicrosoftAD) Microsoft AD edition (Standard or Enterprise).
    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 []GetDirectoryRadiusSetting
    SecurityGroupId string
    ID of the security group created by the directory/connector.
    ShortName string
    Short name of the directory/connector, such as CORP.
    Size string
    (for SimpleAD and ADConnector) Size of the directory/connector (Small or Large).
    Tags map[string]string
    A map of tags assigned to the directory/connector.
    Type string
    Directory type (SimpleAD, ADConnector or MicrosoftAD).
    VpcSettings []GetDirectoryVpcSetting
    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<GetDirectoryConnectSetting>
    description String
    Textual description for the directory/connector.
    directoryId String
    dnsIpAddresses List<String>
    List of IP addresses of the DNS servers for the directory/connector.
    edition String
    (for MicrosoftAD) Microsoft AD edition (Standard or Enterprise).
    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<GetDirectoryRadiusSetting>
    securityGroupId String
    ID of the security group created by the directory/connector.
    shortName String
    Short name of the directory/connector, such as CORP.
    size String
    (for SimpleAD and ADConnector) Size of the directory/connector (Small or Large).
    tags Map<String,String>
    A map of tags assigned to the directory/connector.
    type String
    Directory type (SimpleAD, ADConnector or MicrosoftAD).
    vpcSettings List<GetDirectoryVpcSetting>
    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 GetDirectoryConnectSetting[]
    description string
    Textual description for the directory/connector.
    directoryId string
    dnsIpAddresses string[]
    List of IP addresses of the DNS servers for the directory/connector.
    edition string
    (for MicrosoftAD) Microsoft AD edition (Standard or Enterprise).
    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 GetDirectoryRadiusSetting[]
    securityGroupId string
    ID of the security group created by the directory/connector.
    shortName string
    Short name of the directory/connector, such as CORP.
    size string
    (for SimpleAD and ADConnector) Size of the directory/connector (Small or Large).
    tags {[key: string]: string}
    A map of tags assigned to the directory/connector.
    type string
    Directory type (SimpleAD, ADConnector or MicrosoftAD).
    vpcSettings GetDirectoryVpcSetting[]
    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[GetDirectoryConnectSetting]
    description str
    Textual description for the directory/connector.
    directory_id str
    dns_ip_addresses Sequence[str]
    List of IP addresses of the DNS servers for the directory/connector.
    edition str
    (for MicrosoftAD) Microsoft AD edition (Standard or Enterprise).
    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[GetDirectoryRadiusSetting]
    security_group_id str
    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 SimpleAD and ADConnector) Size of the directory/connector (Small or Large).
    tags Mapping[str, str]
    A map of tags assigned to the directory/connector.
    type str
    Directory type (SimpleAD, ADConnector or MicrosoftAD).
    vpc_settings Sequence[GetDirectoryVpcSetting]
    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
    dnsIpAddresses List<String>
    List of IP addresses of the DNS servers for the directory/connector.
    edition String
    (for MicrosoftAD) Microsoft AD edition (Standard or Enterprise).
    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>
    securityGroupId String
    ID of the security group created by the directory/connector.
    shortName String
    Short name of the directory/connector, such as CORP.
    size String
    (for SimpleAD and ADConnector) Size of the directory/connector (Small or Large).
    tags Map<String>
    A map of tags assigned to the directory/connector.
    type String
    Directory type (SimpleAD, ADConnector or MicrosoftAD).
    vpcSettings List<Property Map>

    Supporting Types

    GetDirectoryConnectSetting

    AvailabilityZones List<string>
    ConnectIps List<string>
    IP addresses of the AD Connector servers.
    CustomerDnsIps List<string>
    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.
    CustomerDnsIps []string
    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.
    customerDnsIps List<String>
    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.
    customerDnsIps string[]
    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_ips Sequence[str]
    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.
    customerDnsIps List<String>
    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.
    UseSameUsername bool
    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.
    UseSameUsername bool
    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.
    useSameUsername Boolean
    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.
    useSameUsername boolean
    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_username bool
    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.
    useSameUsername Boolean
    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 aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi