

Weitere AWS SDK-Beispiele sind im GitHub Repo [AWS Doc SDK Examples](https://github.com/awsdocs/aws-doc-sdk-examples) verfügbar.

Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.

# Verwendung von `ListDocuments` mit einer CLI
<a name="ssm_example_ssm_ListDocuments_section"></a>

Die folgenden Code-Beispiele zeigen, wie `ListDocuments` verwendet wird.

------
#### [ CLI ]

**AWS CLI**  
**Beispiel 1: Dokumente auflisten**  
Das folgende `list-documents`-Beispiel listet Dokumente auf, die dem anfragenden Konto gehören und mit dem benutzerdefinierten Tag versehen sind.  

```
aws ssm list-documents \
    --filters Key=Owner,Values=Self Key=tag:DocUse,Values=Testing
```
Ausgabe:  

```
{
    "DocumentIdentifiers": [
        {
            "Name": "Example",
            "Owner": "29884EXAMPLE",
            "PlatformTypes": [
                "Windows",
                "Linux"
            ],
            "DocumentVersion": "1",
            "DocumentType": "Automation",
            "SchemaVersion": "0.3",
            "DocumentFormat": "YAML",
            "Tags": [
                {
                    "Key": "DocUse",
                    "Value": "Testing"
                }
            ]
        }
    ]
}
```
Weitere Informationen finden Sie unter [AWS -Systems-Manager-Dokumenten](https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-ssm-docs.html) im *AWS -Systems-Manager-Benutzerhandbuch*.  
**Beispiel 2: Geteilte Dokumente auflisten**  
Das folgende `list-documents` Beispiel listet gemeinsam genutzte Dokumente auf, einschließlich privater geteilter Dokumente, die nicht Eigentum von sind AWS.  

```
aws ssm list-documents \
    --filters Key=Name,Values=sharedDocNamePrefix  Key=Owner,Values=Private
```
Ausgabe:  

```
{
    "DocumentIdentifiers": [
        {
            "Name": "Example",
            "Owner": "12345EXAMPLE",
            "PlatformTypes": [
                "Windows",
                "Linux"
            ],
            "DocumentVersion": "1",
            "DocumentType": "Command",
            "SchemaVersion": "0.3",
            "DocumentFormat": "YAML",
            "Tags": []
        }
    ]
}
```
Weitere Informationen finden Sie unter [AWS -Systems-Manager-Dokumenten](https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-ssm-docs.html) im *AWS -Systems-Manager-Benutzerhandbuch*.  
+  Einzelheiten zur API finden Sie [ListDocuments](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ssm/list-documents.html)in der *AWS CLI Befehlsreferenz*. 

------
#### [ PowerShell ]

**Tools für PowerShell V4**  
**Beispiel 1: Listet alle Konfigurationsdokumente in Ihrem Konto auf.**  

```
Get-SSMDocumentList
```
**Ausgabe:**  

```
DocumentType    : Command
DocumentVersion : 1
Name            : AWS-ApplyPatchBaseline
Owner           : Amazon
PlatformTypes   : {Windows}
SchemaVersion   : 1.2

DocumentType    : Command
DocumentVersion : 1
Name            : AWS-ConfigureAWSPackage
Owner           : Amazon
PlatformTypes   : {Windows, Linux}
SchemaVersion   : 2.0

DocumentType    : Command
DocumentVersion : 1
Name            : AWS-ConfigureCloudWatch
Owner           : Amazon
PlatformTypes   : {Windows}
SchemaVersion   : 1.2
...
```
**Beispiel 2: In diesem Beispiel werden alle Automatisierungsdokumente abgerufen, deren Name mit „Platform“ übereinstimmt**  

```
Get-SSMDocumentList -DocumentFilterList @{Key="DocumentType";Value="Automation"} | Where-Object Name -Match "Platform"
```
**Ausgabe:**  

```
DocumentFormat  : JSON
DocumentType    : Automation
DocumentVersion : 7
Name            : KT-Get-Platform
Owner           : 987654123456
PlatformTypes   : {Windows, Linux}
SchemaVersion   : 0.3
Tags            : {}
TargetType      :
VersionName     :
```
+  Einzelheiten zur API finden Sie unter [ListDocuments AWS -Tools für PowerShell](https://docs.aws.amazon.com/powershell/v4/reference)*Cmdlet-Referenz (V4).* 

**Tools für V5 PowerShell **  
**Beispiel 1: Listet alle Konfigurationsdokumente in Ihrem Konto auf.**  

```
Get-SSMDocumentList
```
**Ausgabe:**  

```
DocumentType    : Command
DocumentVersion : 1
Name            : AWS-ApplyPatchBaseline
Owner           : Amazon
PlatformTypes   : {Windows}
SchemaVersion   : 1.2

DocumentType    : Command
DocumentVersion : 1
Name            : AWS-ConfigureAWSPackage
Owner           : Amazon
PlatformTypes   : {Windows, Linux}
SchemaVersion   : 2.0

DocumentType    : Command
DocumentVersion : 1
Name            : AWS-ConfigureCloudWatch
Owner           : Amazon
PlatformTypes   : {Windows}
SchemaVersion   : 1.2
...
```
**Beispiel 2: In diesem Beispiel werden alle Automatisierungsdokumente abgerufen, deren Name mit „Platform“ übereinstimmt**  

```
Get-SSMDocumentList -DocumentFilterList @{Key="DocumentType";Value="Automation"} | Where-Object Name -Match "Platform"
```
**Ausgabe:**  

```
DocumentFormat  : JSON
DocumentType    : Automation
DocumentVersion : 7
Name            : KT-Get-Platform
Owner           : 987654123456
PlatformTypes   : {Windows, Linux}
SchemaVersion   : 0.3
Tags            : {}
TargetType      :
VersionName     :
```
+  Einzelheiten zur API finden Sie unter [ListDocuments AWS -Tools für PowerShell](https://docs.aws.amazon.com/powershell/v5/reference)*Cmdlet-Referenz (*V5). 

------