AWS 文档 AWS SDK示例 GitHub 存储库中还有更多SDK示例
本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
DescribeDirectories
与 a 一起使用 CLI
以下代码示例演示如何使用 DescribeDirectories
。
- CLI
-
- AWS CLI
-
获取有关您的目录的详细信息
以下
describe-directories
示例显示有关指定目录的详细信息。aws ds describe-directories \ --directory-id
d-a1b2c3d4e5
输出:
{ "DirectoryDescriptions": [ { "DirectoryId": "d-a1b2c3d4e5", "Name": "mydirectory.example.com", "ShortName": "mydirectory", "Size": "Small", "Edition": "Standard", "Alias": "d-a1b2c3d4e5", "AccessUrl": "d-a1b2c3d4e5.awsapps.com", "Stage": "Active", "ShareStatus": "Shared", "ShareMethod": "HANDSHAKE", "ShareNotes": "These are my share notes", "LaunchTime": "2019-07-08T15:33:46.327000-07:00", "StageLastUpdatedDateTime": "2019-07-08T15:59:12.307000-07:00", "Type": "SharedMicrosoftAD", "SsoEnabled": false, "DesiredNumberOfDomainControllers": 0, "OwnerDirectoryDescription": { "DirectoryId": "d-b2c3d4e5f6", "AccountId": "123456789111", "DnsIpAddrs": [ "203.113.0.248", "203.113.0.253" ], "VpcSettings": { "VpcId": "vpc-a1b2c3d4", "SubnetIds": [ "subnet-a1b2c3d4", "subnet-d4c3b2a1" ], "AvailabilityZones": [ "us-west-2a", "us-west-2c" ] } } } ] }
-
有关API详细信息,请参阅 “DescribeDirectories AWS CLI
命令参考”。
-
- PowerShell
-
- 用于 PowerShell
-
示例 1:此命令获取有关属于此帐户的目录的信息。
Get-DSDirectory | Select-Object DirectoryId, Name, DnsIpAddrs, Type
输出:
DirectoryId Name DnsIpAddrs Type ----------- ---- ---------- ---- d-123456abcd abcd.example.com {172.31.74.189, 172.31.13.145} SimpleAD d-123456efgh wifi.example.com {172.31.16.108, 172.31.10.56} ADConnector d-123456ijkl lan2.example.com {172.31.10.56, 172.31.16.108} MicrosoftAD
-
有关API详细信息,请参阅 AWS Tools for PowerShell Cmdlet 参考DescribeDirectories中的。
-
操作
DescribeTrusts