

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 `StartAutomationExecution` mit einer CLI
<a name="ssm_example_ssm_StartAutomationExecution_section"></a>

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

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

**AWS CLI**  
**Beispiel 1: So führen Sie ein Automation-Dokument aus**  
Im folgenden Beispiel `start-automation-execution` wird ein Automation-Dokument ausgeführt.  

```
aws ssm start-automation-execution \
    --document-name "AWS-UpdateLinuxAmi" \
    --parameters "AutomationAssumeRole=arn:aws:iam::123456789012:role/SSMAutomationRole,SourceAmiId=ami-EXAMPLE,IamInstanceProfileName=EC2InstanceRole"
```
Ausgabe:  

```
{
  "AutomationExecutionId": "4105a4fc-f944-11e6-9d32-0a1b2EXAMPLE"
}
```
Weitere Informationen finden Sie unter [Manuelles Ausführen eines Automation-Workflows](https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-working-executing-manually.html) im *AWS -Systems-Manager-Benutzerhandbuch*.  
**Beispiel 2: So führen Sie ein gemeinsam genutztes Automatisierungsdokument aus**  
Im folgenden Beispiel `start-automation-execution` wird ein gemeinsam genutztes Automation-Dokument ausgeführt.  

```
aws ssm start-automation-execution \
    --document-name "arn:aws:ssm:us-east-1:123456789012:document/ExampleDocument"
```
Ausgabe:  

```
{
  "AutomationExecutionId": "4105a4fc-f944-11e6-9d32-0a1b2EXAMPLE"
}
```
Weitere Informationen finden Sie unter [Verwenden von geteilten SSM-Dokumenten](https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-using-shared.html) im *AWS -Systems-Manager-Benutzerhandbuch*.  
+  Einzelheiten zur API finden Sie [StartAutomationExecution](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ssm/start-automation-execution.html)in der *AWS CLI Befehlsreferenz*. 

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

**Tools für PowerShell V4**  
**Beispiel 1: In diesem Beispiel wird ein Dokument ausgeführt, das eine Automation-Rolle, eine AMI-Quell-ID und eine Amazon-EC2-Instance-Rolle angibt.**  

```
Start-SSMAutomationExecution -DocumentName AWS-UpdateLinuxAmi -Parameter @{'AutomationAssumeRole'='arn:aws:iam::123456789012:role/SSMAutomationRole';'SourceAmiId'='ami-f173cc91';'InstanceIamRole'='EC2InstanceRole'}
```
**Ausgabe:**  

```
3a532a4f-0382-11e7-9df7-6f11185f6dd1
```
+  Einzelheiten zur API finden Sie unter [StartAutomationExecution AWS -Tools für PowerShell](https://docs.aws.amazon.com/powershell/v4/reference)*Cmdlet-Referenz (V4).* 

**Tools für V5 PowerShell **  
**Beispiel 1: In diesem Beispiel wird ein Dokument ausgeführt, das eine Automation-Rolle, eine AMI-Quell-ID und eine Amazon-EC2-Instance-Rolle angibt.**  

```
Start-SSMAutomationExecution -DocumentName AWS-UpdateLinuxAmi -Parameter @{'AutomationAssumeRole'='arn:aws:iam::123456789012:role/SSMAutomationRole';'SourceAmiId'='ami-f173cc91';'InstanceIamRole'='EC2InstanceRole'}
```
**Ausgabe:**  

```
3a532a4f-0382-11e7-9df7-6f11185f6dd1
```
+  Einzelheiten zur API finden Sie unter [StartAutomationExecution AWS -Tools für PowerShell](https://docs.aws.amazon.com/powershell/v5/reference)*Cmdlet-Referenz (*V5). 

------