

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.

# App Runner-Beispiele mit AWS CLI
<a name="cli_2_apprunner_code_examples"></a>

Die folgenden Codebeispiele zeigen Ihnen, wie Sie AWS Command Line Interface mit App Runner Aktionen ausführen und gängige Szenarien implementieren.

*Aktionen* sind Codeauszüge aus größeren Programmen und müssen im Kontext ausgeführt werden. Während Aktionen Ihnen zeigen, wie Sie einzelne Service-Funktionen aufrufen, können Sie Aktionen im Kontext der zugehörigen Szenarien anzeigen.

Jedes Beispiel enthält einen Link zum vollständigen Quellcode, wo Sie Anweisungen zum Einrichten und Ausführen des Codes im Kodex finden.

**Topics**
+ [Aktionen](#actions)

## Aktionen
<a name="actions"></a>

### `associate-custom-domain`
<a name="apprunner_AssociateCustomDomain_cli_2_topic"></a>

Das folgende Codebeispiel zeigt, wie Sie`associate-custom-domain`.

**AWS CLI**  
**So weisen Sie einem Service einen Domainnamen und die www-Subdomain zu**  
Im folgenden Beispiel für `associate-custom-domain` wird ein benutzerdefinierter Domainname, den Sie steuern, einem App-Runner-Service zugeordnet. Der Domainname ist die Stammdomain `example.com`, einschließlich der Subdomain für Sonderfälle `www.example.com`.  

```
aws apprunner associate-custom-domain \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa",
    "DomainName": "example.com",
    "EnableWWWSubdomain": true
}
```
Ausgabe:  

```
{
    "CustomDomain": {
        "CertificateValidationRecords": [
            {
                "Name": "_70d3f50a94f7c72dc28784cf55db2f6b.example.com",
                "Status": "PENDING_VALIDATION",
                "Type": "CNAME",
                "Value": "_1270c137383c6307b6832db02504c4b0.bsgbmzkfwj.acm-validations.aws."
            },
            {
                "Name": "_287870d3f50a94f7c72dc4cf55db2f6b.www.example.com",
                "Status": "PENDING_VALIDATION",
                "Type": "CNAME",
                "Value": "_832db01270c137383c6307b62504c4b0.mzkbsgbfwj.acm-validations.aws."
            }
        ],
        "DomainName": "example.com",
        "EnableWWWSubdomain": true,
        "Status": "CREATING"
    },
    "DNSTarget": "psbqam834h.us-east-1.awsapprunner.com",
    "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa"
}
```
+  Einzelheiten zur API finden Sie [AssociateCustomDomain](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/associate-custom-domain.html)in der *AWS CLI Befehlsreferenz*. 

### `create-auto-scaling-configuration`
<a name="apprunner_CreateAutoScalingConfiguration_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`create-auto-scaling-configuration`.

**AWS CLI**  
**So erstellen Sie eine Auto-Scaling-Konfiguration mit hoher Verfügbarkeit**  
Im folgenden Beispiel für `create-auto-scaling-configuration` wird eine für hohe Verfügbarkeit optimierte Auto-Scaling-Konfiguration erstellt, indem der Wert `MinSize` auf 5 gesetzt wird. Mit dieser Konfiguration versucht App Runner, Ihre Serviceinstanzen auf möglichst viele Availability Zones zu verteilen, je nach AWS Region bis zu fünf.  
Der Aufruf gibt ein `AutoScalingConfiguration`-Objekt zurück, bei dem die anderen Einstellungen auf die Standardwerte festgelegt sind. In diesem Beispiel ist dies der erste Aufruf zur Erstellung einer Konfiguration mit dem Namen `high-availability`. Die Revision ist auf 1 gesetzt und es ist die neueste Revision.  

```
aws apprunner create-auto-scaling-configuration \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "AutoScalingConfigurationName": "high-availability",
    "MinSize": 5
}
```
Ausgabe:  

```
{
    "AutoScalingConfiguration": {
        "AutoScalingConfigurationArn": "arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability/1/2f50e7656d7819fead0f59672e68042e",
        "AutoScalingConfigurationName": "high-availability",
        "AutoScalingConfigurationRevision": 1,
        "CreatedAt": "2020-11-03T00:29:17Z",
        "Latest": true,
        "Status": "ACTIVE",
        "MaxConcurrency": 100,
        "MaxSize": 50,
        "MinSize": 5
    }
}
```
+  Einzelheiten zur API finden Sie [CreateAutoScalingConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/create-auto-scaling-configuration.html)in der *AWS CLI Befehlsreferenz*. 

### `create-connection`
<a name="apprunner_CreateConnection_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`create-connection`.

**AWS CLI**  
**Um eine GitHub Verbindung herzustellen**  
Das folgende `create-connection` Beispiel stellt eine Verbindung zu einem privaten GitHub Code-Repository her. Der Verbindungsstatus nach einem erfolgreichen Anruf lautet `PENDING_HANDSHAKE`. Dies liegt daran, dass ein Authentifizierungs-Handshake mit dem Anbieter immer noch nicht stattgefunden hat. Schließen Sie den Handshake mit der App-Runner-Konsole ab.  

```
aws apprunner create-connection \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ConnectionName": "my-github-connection",
    "ProviderType": "GITHUB"
}
```
Ausgabe:  

```
{
    "Connection": {
        "ConnectionArn": "arn:aws:apprunner:us-east-1:123456789012:connection/my-github-connection",
        "ConnectionName": "my-github-connection",
        "Status": "PENDING_HANDSHAKE",
        "CreatedAt": "2020-11-03T00:32:51Z",
        "ProviderType": "GITHUB"
    }
}
```
Weitere Informationen finden Sie unter [Verwalten von App-Runner-Verbindungen](https://docs.aws.amazon.com/apprunner/latest/dg/manage-connections.html) im *Entwicklerhandbuch für AWS App Runner*.  
+  Einzelheiten zur API finden Sie [CreateConnection](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/create-connection.html)in der *AWS CLI Befehlsreferenz*. 

### `create-service`
<a name="apprunner_CreateService_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`create-service`.

**AWS CLI**  
**Beispiel 1: So erstellen Sie einen Quellcode-Repository-Service**  
Im folgenden Beispiel für `create-service` wird ein App-Runner-Service auf der Grundlage eines Python-Quellcode-Repositorys erstellt.  

```
aws apprunner create-service \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ServiceName": "python-app",
    "SourceConfiguration": {
        "AuthenticationConfiguration": {
            "ConnectionArn": "arn:aws:apprunner:us-east-1:123456789012:connection/my-github-connection/e7656250f67242d7819feade6800f59e"
        },
        "AutoDeploymentsEnabled": true,
        "CodeRepository": {
            "RepositoryUrl": "https://github.com/my-account/python-hello",
            "SourceCodeVersion": {
                "Type": "BRANCH",
                "Value": "main"
            },
            "CodeConfiguration": {
                "ConfigurationSource": "API",
                "CodeConfigurationValues": {
                    "Runtime": "PYTHON_3",
                    "BuildCommand": "pip install -r requirements.txt",
                    "StartCommand": "python server.py",
                    "Port": "8080",
                    "RuntimeEnvironmentVariables": [
                        {
                            "NAME": "Jane"
                        }
                    ]
                }
            }
        }
    },
    "InstanceConfiguration": {
        "CPU": "1 vCPU",
        "Memory": "3 GB"
    }
}
```
Ausgabe:  

```
{
    "OperationId": "17fe9f55-7e91-4097-b243-fcabbb69a4cf",
    "Service": {
        "CreatedAt": "2020-11-20T19:05:25Z",
        "UpdatedAt": "2020-11-20T19:05:25Z",
        "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa",
        "ServiceId": "8fe1e10304f84fd2b0df550fe98a71fa",
        "ServiceName": "python-app",
        "ServiceUrl": "psbqam834h.us-east-1.awsapprunner.com",
        "SourceConfiguration": {
            "AuthenticationConfiguration": {
                "ConnectionArn": "arn:aws:apprunner:us-east-1:123456789012:connection/my-github-connection/e7656250f67242d7819feade6800f59e"
            },
            "AutoDeploymentsEnabled": true,
            "CodeRepository": {
                "CodeConfiguration": {
                    "CodeConfigurationValues": {
                        "BuildCommand": "pip install -r requirements.txt",
                        "Port": "8080",
                        "Runtime": "PYTHON_3",
                        "RuntimeEnvironmentVariables": [
                            {
                                "NAME": "Jane"
                            }
                        ],
                        "StartCommand": "python server.py"
                    },
                    "ConfigurationSource": "Api"
                },
                "RepositoryUrl": "https://github.com/my-account/python-hello",
                "SourceCodeVersion": {
                    "Type": "BRANCH",
                    "Value": "main"
                }
            }
        },
        "Status": "OPERATION_IN_PROGRESS",
        "InstanceConfiguration": {
            "CPU": "1 vCPU",
            "Memory": "3 GB"
        }
    }
}
```
**Beispiel 2: So erstellen Sie einen Quellcode-Repository-Service**  
Im folgenden Beispiel für `create-service` wird ein App-Runner-Service auf der Grundlage eines Python-Quellcode-Repositorys erstellt.  

```
aws apprunner create-service \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ServiceName": "python-app",
    "SourceConfiguration": {
        "AuthenticationConfiguration": {
            "ConnectionArn": "arn:aws:apprunner:us-east-1:123456789012:connection/my-github-connection/e7656250f67242d7819feade6800f59e"
        },
        "AutoDeploymentsEnabled": true,
        "CodeRepository": {
            "RepositoryUrl": "https://github.com/my-account/python-hello",
            "SourceCodeVersion": {
                "Type": "BRANCH",
                "Value": "main"
            },
            "CodeConfiguration": {
                "ConfigurationSource": "API",
                "CodeConfigurationValues": {
                    "Runtime": "PYTHON_3",
                    "BuildCommand": "pip install -r requirements.txt",
                    "StartCommand": "python server.py",
                    "Port": "8080",
                    "RuntimeEnvironmentVariables": [
                        {
                            "NAME": "Jane"
                        }
                    ]
                }
            }
        }
    },
    "InstanceConfiguration": {
        "CPU": "1 vCPU",
        "Memory": "3 GB"
    }
}
```
Ausgabe:  

```
{
    "OperationId": "17fe9f55-7e91-4097-b243-fcabbb69a4cf",
    "Service": {
        "CreatedAt": "2020-11-20T19:05:25Z",
        "UpdatedAt": "2020-11-20T19:05:25Z",
        "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa",
        "ServiceId": "8fe1e10304f84fd2b0df550fe98a71fa",
        "ServiceName": "python-app",
        "ServiceUrl": "psbqam834h.us-east-1.awsapprunner.com",
        "SourceConfiguration": {
            "AuthenticationConfiguration": {
                "ConnectionArn": "arn:aws:apprunner:us-east-1:123456789012:connection/my-github-connection/e7656250f67242d7819feade6800f59e"
            },
            "AutoDeploymentsEnabled": true,
            "CodeRepository": {
                "CodeConfiguration": {
                    "CodeConfigurationValues": {
                        "BuildCommand": "pip install -r requirements.txt",
                        "Port": "8080",
                        "Runtime": "PYTHON_3",
                        "RuntimeEnvironmentVariables": [
                            {
                                "NAME": "Jane"
                            }
                        ],
                        "StartCommand": "python server.py"
                    },
                    "ConfigurationSource": "Api"
                },
                "RepositoryUrl": "https://github.com/my-account/python-hello",
                "SourceCodeVersion": {
                    "Type": "BRANCH",
                    "Value": "main"
                }
            }
        },
        "Status": "OPERATION_IN_PROGRESS",
        "InstanceConfiguration": {
            "CPU": "1 vCPU",
            "Memory": "3 GB"
        }
    }
}
```
**Beispiel 3: So erstellen Sie einen Quell-Image-Repository-Service**  
Im folgenden Beispiel für `create-service` wird ein App-Runner-Service auf der Grundlage eines in Elastic Container Registry (ECR) gespeicherten Images erstellt.  

```
aws apprunner create-service \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ServiceName": "golang-container-app",
    "SourceConfiguration": {
        "AuthenticationConfiguration": {
            "AccessRoleArn": "arn:aws:iam::123456789012:role/my-ecr-role"
        },
        "AutoDeploymentsEnabled": true,
        "ImageRepository": {
            "ImageIdentifier": "123456789012.dkr.ecr.us-east-1.amazonaws.com/golang-app:latest",
            "ImageConfiguration": {
                "Port": "8080",
                "RuntimeEnvironmentVariables": [
                    {
                        "NAME": "Jane"
                    }
                ]
            },
            "ImageRepositoryType": "ECR"
        }
    },
    "InstanceConfiguration": {
        "CPU": "1 vCPU",
        "Memory": "3 GB"
    }
}
```
Ausgabe:  

```
{
    "OperationId": "17fe9f55-7e91-4097-b243-fcabbb69a4cf",
    "Service": {
        "CreatedAt": "2020-11-06T23:15:30Z",
        "UpdatedAt": "2020-11-06T23:15:30Z",
        "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/golang-container-app/51728f8a20ce46d39b25398a6c8e9d1a",
        "ServiceId": "51728f8a20ce46d39b25398a6c8e9d1a",
        "ServiceName": "golang-container-app",
        "ServiceUrl": "psbqam834h.us-east-1.awsapprunner.com",
        "SourceConfiguration": {
            "AuthenticationConfiguration": {
                "AccessRoleArn": "arn:aws:iam::123456789012:role/my-ecr-role"
            },
            "AutoDeploymentsEnabled": true,
            "ImageRepository": {
                "ImageIdentifier": "123456789012.dkr.ecr.us-east-1.amazonaws.com/golang-app:latest",
                "ImageConfiguration": {
                    "Port": "8080",
                    "RuntimeEnvironmentVariables": [
                        {
                            "NAME": "Jane"
                        }
                    ]
                },
                "ImageRepositoryType": "ECR"
            }
        },
        "Status": "OPERATION_IN_PROGRESS",
        "InstanceConfiguration": {
            "CPU": "1 vCPU",
            "Memory": "3 GB"
        }
    }
}
```
+  Einzelheiten zur API finden Sie [CreateService](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/create-service.html)in der *AWS CLI Befehlsreferenz*. 

### `delete-auto-scaling-configuration`
<a name="apprunner_DeleteAutoScalingConfiguration_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`delete-auto-scaling-configuration`.

**AWS CLI**  
**Beispiel 1: So löschen Sie die letzte aktive Revision einer Auto-Scaling-Konfiguration**  
Im folgenden Beispiel für `delete-auto-scaling-configuration` wird die letzte aktive Revision einer Auto-Scaling-Konfiguration für App Runner gelöscht. Um die letzte aktive Revision zu löschen, geben Sie einen Amazon-Ressourcennamen (ARN) an, der mit dem Konfigurationsnamen endet, ohne die Revisionskomponente.  
In diesem Beispiel sind vor dieser Aktion zwei Revisionen vorhanden. Daher wird Revision 2 (die neueste) gelöscht. Jetzt wird jedoch `"Latest": false` angezeigt, da es sich nach dem Löschen nicht mehr um die letzte aktive Revision handelt.  

```
aws apprunner delete-auto-scaling-configuration \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "AutoScalingConfigurationArn": "arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability"
}
```
Ausgabe:  

```
{
    "AutoScalingConfiguration": {
        "AutoScalingConfigurationArn": "arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability/2/e76562f50d78042e819fead0f59672e6",
        "AutoScalingConfigurationName": "high-availability",
        "AutoScalingConfigurationRevision": 2,
        "CreatedAt": "2021-02-25T17:42:59Z",
        "DeletedAt": "2021-03-02T08:07:06Z",
        "Latest": false,
        "Status": "INACTIVE",
        "MaxConcurrency": 30,
        "MaxSize": 90,
        "MinSize": 5
    }
}
```
**Beispiel 2: So löschen Sie eine bestimmte Revision einer Auto-Scaling-Konfiguration**  
Im folgenden Beispiel für `delete-auto-scaling-configuration` wird eine bestimmte Revision einer Auto-Scaling-Konfiguration für App Runner gelöscht. Um eine bestimmte Revision zu löschen, geben Sie einen ARN an, der die Revisionsnummer enthält.  
In diesem Beispiel sind vor dieser Aktion zwei Revisionen vorhanden. Die Aktion löscht die Revision `1`.  

```
aws apprunner delete-auto-scaling-configuration \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "AutoScalingConfigurationArn": "arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability/1"
}
```
Ausgabe:  

```
{
    "AutoScalingConfiguration": {
        "AutoScalingConfigurationArn": "arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability/1/2f50e7656d7819fead0f59672e68042e",
        "AutoScalingConfigurationName": "high-availability",
        "AutoScalingConfigurationRevision": 1,
        "CreatedAt": "2020-11-03T00:29:17Z",
        "DeletedAt": "2021-03-02T08:07:06Z",
        "Latest": false,
        "Status": "INACTIVE",
        "MaxConcurrency": 100,
        "MaxSize": 50,
        "MinSize": 5
    }
}
```
+  Einzelheiten zur API finden Sie [DeleteAutoScalingConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/delete-auto-scaling-configuration.html)in der *AWS CLI Befehlsreferenz*. 

### `delete-connection`
<a name="apprunner_DeleteConnection_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`delete-connection`.

**AWS CLI**  
**So löschen Sie eine Verbindung**  
Im folgenden Beispiel für `delete-connection` wird eine App-Runner-Verbindung gelöscht. Der Verbindungsstatus nach einem erfolgreichen Anruf lautet `DELETED`. Das liegt daran, dass die Verbindung nicht mehr verfügbar ist.  

```
aws apprunner delete-connection \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ConnectionArn": "arn:aws:apprunner:us-east-1:123456789012:connection/my-github-connection"
}
```
Ausgabe:  

```
{
    "Connection": {
        "ConnectionArn": "arn:aws:apprunner:us-east-1:123456789012:connection/my-github-connection",
        "ConnectionName": "my-github-connection",
        "Status": "DELETED",
        "CreatedAt": "2020-11-03T00:32:51Z",
        "ProviderType": "GITHUB"
    }
}
```
+  Einzelheiten zur API finden Sie [DeleteConnection](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/delete-connection.html)in der *AWS CLI Befehlsreferenz*. 

### `delete-service`
<a name="apprunner_DeleteService_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`delete-service`.

**AWS CLI**  
**So löschen Sie einen Service**  
Im folgenden Beispiel für `delete-service` wird ein App-Runner-Service gelöscht.  

```
aws apprunner delete-service \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa"
}
```
Ausgabe:  

```
{
    "OperationId": "17fe9f55-7e91-4097-b243-fcabbb69a4cf",
    "Service": {
        "CreatedAt": "2020-11-20T19:05:25Z",
        "UpdatedAt": "2020-11-20T19:05:25Z",
        "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa",
        "ServiceId": "8fe1e10304f84fd2b0df550fe98a71fa",
        "ServiceName": "python-app",
        "ServiceUrl": "psbqam834h.us-east-1.awsapprunner.com",
        "SourceConfiguration": {
            "AuthenticationConfiguration": {
                "ConnectionArn": "arn:aws:apprunner:us-east-1:123456789012:connection/my-github-connection/e7656250f67242d7819feade6800f59e"
            },
            "AutoDeploymentsEnabled": true,
            "CodeRepository": {
                "CodeConfiguration": {
                    "CodeConfigurationValues": {
                        "BuildCommand": "pip install -r requirements.txt",
                        "Port": "8080",
                        "Runtime": "PYTHON_3",
                        "RuntimeEnvironmentVariables": [
                            {
                                "NAME": "Jane"
                            }
                        ],
                        "StartCommand": "python server.py"
                    },
                    "ConfigurationSource": "Api"
                },
                "RepositoryUrl": "https://github.com/my-account/python-hello",
                "SourceCodeVersion": {
                    "Type": "BRANCH",
                    "Value": "main"
                }
            }
        },
        "Status": "OPERATION_IN_PROGRESS",
        "InstanceConfiguration": {
            "CPU": "1 vCPU",
            "Memory": "3 GB"
        }
    }
}
```
+  Einzelheiten zur API finden Sie [DeleteService](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/delete-service.html)in der *AWS CLI Befehlsreferenz*. 

### `describe-auto-scaling-configuration`
<a name="apprunner_DescribeAutoScalingConfiguration_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`describe-auto-scaling-configuration`.

**AWS CLI**  
**Beispiel 1: So beschreiben Sie die letzte aktive Revision einer Auto-Scaling-Konfiguration**  
Im folgenden Beispiel für `describe-auto-scaling-configuration` wird eine Beschreibung der letzten aktiven Revision einer Auto-Scaling-Konfiguration für App Runner abgerufen. Um die letzte aktive Revision zu beschreiben, geben Sie einen ARN an, der mit dem Konfigurationsnamen endet, ohne die Revisionskomponente.  
In dem Beispiel sind zwei Revisionen vorhanden. Daher wird Revision `2` (die neueste) beschrieben. Das resultierende Objekt zeigt `"Latest": true` an.  

```
aws apprunner describe-auto-scaling-configuration \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "AutoScalingConfigurationArn": "arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability"
}
```
Ausgabe:  

```
{
    "AutoScalingConfiguration": {
        "AutoScalingConfigurationArn": "arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability/2/e76562f50d78042e819fead0f59672e6",
        "AutoScalingConfigurationName": "high-availability",
        "AutoScalingConfigurationRevision": 2,
        "CreatedAt": "2021-02-25T17:42:59Z",
        "Latest": true,
        "Status": "ACTIVE",
        "MaxConcurrency": 30,
        "MaxSize": 90,
        "MinSize": 5
    }
}
```
**Beispiel 2: So beschreiben Sie eine bestimmte Revision einer Auto-Scaling-Konfiguration**  
Im folgenden Beispiel für `describe-auto-scaling-configuration` wird eine Beschreibung einer bestimmten Revision einer Auto-Scaling-Konfiguration für App Runner abgerufen. Um eine bestimmte Revision zu beschreiben, geben Sie einen ARN an, der die Revisionsnummer enthält.  
In dem Beispiel existieren mehrere Revisionen und die Revision `1` wird abgefragt. Das resultierende Objekt zeigt `"Latest": false` an.  

```
aws apprunner describe-auto-scaling-configuration \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "AutoScalingConfigurationArn": "arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability/1"
}
```
Ausgabe:  

```
{
    "AutoScalingConfiguration": {
        "AutoScalingConfigurationArn": "arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability/1/2f50e7656d7819fead0f59672e68042e",
        "AutoScalingConfigurationName": "high-availability",
        "AutoScalingConfigurationRevision": 1,
        "CreatedAt": "2020-11-03T00:29:17Z",
        "Latest": false,
        "Status": "ACTIVE",
        "MaxConcurrency": 100,
        "MaxSize": 50,
        "MinSize": 5
    }
}
```
+  Einzelheiten zur API finden Sie [DescribeAutoScalingConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/describe-auto-scaling-configuration.html)in der *AWS CLI Befehlsreferenz*. 

### `describe-custom-domains`
<a name="apprunner_DescribeCustomDomains_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`describe-custom-domains`.

**AWS CLI**  
**So rufen Sie Beschreibungen von benutzerdefinierten Domainnamen ab, die einem Service zugeordnet sind**  
Im folgenden Beispiel für `describe-custom-domains` werden Beschreibungen und der Status der benutzerdefinierten Domainnamen abgerufen, die einem App-Runner-Service zugeordnet sind.  

```
aws apprunner describe-custom-domains \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa",
    "DomainName": "example.com",
    "EnableWWWSubdomain": true
}
```
Ausgabe:  

```
{
    "CustomDomains": [
        {
            "CertificateValidationRecords": [
                {
                    "Name": "_70d3f50a94f7c72dc28784cf55db2f6b.example.com",
                    "Status": "PENDING_VALIDATION",
                    "Type": "CNAME",
                    "Value": "_1270c137383c6307b6832db02504c4b0.bsgbmzkfwj.acm-validations.aws."
                },
                {
                    "Name": "_287870d3f50a94f7c72dc4cf55db2f6b.www.example.com",
                    "Status": "PENDING_VALIDATION",
                    "Type": "CNAME",
                    "Value": "_832db01270c137383c6307b62504c4b0.mzkbsgbfwj.acm-validations.aws."
                }
            ],
            "DomainName": "example.com",
            "EnableWWWSubdomain": true,
            "Status": "PENDING_CERTIFICATE_DNS_VALIDATION"
        },
        {
            "CertificateValidationRecords": [
                {
                    "Name": "_a94f784c70d3f507c72dc28f55db2f6b.deals.example.com",
                    "Status": "SUCCESS",
                    "Type": "CNAME",
                    "Value": "_2db02504c1270c137383c6307b6834b0.bsgbmzkfwj.acm-validations.aws."
                }
            ],
            "DomainName": "deals.example.com",
            "EnableWWWSubdomain": false,
            "Status": "ACTIVE"
        }
    ],
    "DNSTarget": "psbqam834h.us-east-1.awsapprunner.com",
    "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa"
}
```
+  Einzelheiten zur API finden Sie [DescribeCustomDomains](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/describe-custom-domains.html)in der *AWS CLI Befehlsreferenz*. 

### `describe-service`
<a name="apprunner_DescribeService_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`describe-service`.

**AWS CLI**  
**So beschreiben Sie einen Service**  
Im folgenden Beispiel für `describe-service` wird eine Beschreibung eines App-Runner-Service abgerufen.  

```
aws apprunner describe-service \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa"
}
```
Ausgabe:  

```
{
    "Service": {
        "CreatedAt": "2020-11-20T19:05:25Z",
        "UpdatedAt": "2020-11-20T19:05:25Z",
        "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa",
        "ServiceId": "8fe1e10304f84fd2b0df550fe98a71fa",
        "ServiceName": "python-app",
        "ServiceUrl": "psbqam834h.us-east-1.awsapprunner.com",
        "SourceConfiguration": {
            "AuthenticationConfiguration": {
                "ConnectionArn": "arn:aws:apprunner:us-east-1:123456789012:connection/my-github-connection/e7656250f67242d7819feade6800f59e"
            },
            "AutoDeploymentsEnabled": true,
            "CodeRepository": {
                "CodeConfiguration": {
                    "CodeConfigurationValues": {
                        "BuildCommand": "pip install -r requirements.txt",
                        "Port": "8080",
                        "Runtime": "PYTHON_3",
                        "RuntimeEnvironmentVariables": [
                            {
                                "NAME": "Jane"
                            }
                        ],
                        "StartCommand": "python server.py"
                    },
                    "ConfigurationSource": "Api"
                },
                "RepositoryUrl": "https://github.com/my-account/python-hello",
                "SourceCodeVersion": {
                    "Type": "BRANCH",
                    "Value": "main"
                }
            }
        },
        "Status": "RUNNING",
        "InstanceConfiguration": {
            "CPU": "1 vCPU",
            "Memory": "3 GB"
        }
    }
}
```
+  Einzelheiten zur API finden Sie [DescribeService](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/describe-service.html)in der *AWS CLI Befehlsreferenz*. 

### `disassociate-custom-domain`
<a name="apprunner_DisassociateCustomDomain_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`disassociate-custom-domain`.

**AWS CLI**  
**So heben Sie die Zuordnung eines Domainnamens zu einem Service auf**  
Im folgenden Beispiel für `disassociate-custom-domain` wird die Zuordnung der Domain `example.com` zu einem App-Runner-Service aufgehoben. Durch den Aufruf wird auch die Zuordnung der Subdomain `www.example.com` aufgehoben, die zusammen mit der Stammdomain zugeordnet war.  

```
aws apprunner disassociate-custom-domain \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa",
    "DomainName": "example.com"
}
```
Ausgabe:  

```
{
    "CustomDomain": {
        "CertificateValidationRecords": [
            {
                "Name": "_70d3f50a94f7c72dc28784cf55db2f6b.example.com",
                "Status": "PENDING_VALIDATION",
                "Type": "CNAME",
                "Value": "_1270c137383c6307b6832db02504c4b0.bsgbmzkfwj.acm-validations.aws."
            },
            {
                "Name": "_287870d3f50a94f7c72dc4cf55db2f6b.www.example.com",
                "Status": "PENDING_VALIDATION",
                "Type": "CNAME",
                "Value": "_832db01270c137383c6307b62504c4b0.mzkbsgbfwj.acm-validations.aws."
            }
        ],
        "DomainName": "example.com",
        "EnableWWWSubdomain": true,
        "Status": "DELETING"
    },
    "DNSTarget": "psbqam834h.us-east-1.awsapprunner.com",
    "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa"
}
```
+  Einzelheiten zur API finden Sie [DisassociateCustomDomain](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/disassociate-custom-domain.html)in der *AWS CLI Befehlsreferenz*. 

### `list-auto-scaling-configurations`
<a name="apprunner_ListAutoScalingConfigurations_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`list-auto-scaling-configurations`.

**AWS CLI**  
**So rufen Sie eine paginierte Liste der Auto-Scaling-Konfigurationen von App Runner ab**  
Das folgende `list-auto-scaling-configurations` Beispiel listet alle App Runner Auto Scaling-Konfigurationen in Ihrem AWS Konto auf. In jeder Antwort sind bis zu fünf Auto-Scaling-Konfigurationen aufgelistet. `AutoScalingConfigurationName` und `LatestOnly` sind nicht angegeben. Ihre Standardeinstellungen führen dazu, dass die neueste Version aller aktiven Konfigurationen aufgelistet wird.  
In diesem Beispiel enthält die Antwort zwei Ergebnisse und es gibt keine weiteren, sodass kein `NextToken` zurückgegeben wird.  

```
aws apprunner list-auto-scaling-configurations \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "MaxResults": 5
}
```
Ausgabe:  

```
{
    "AutoScalingConfigurationSummaryList": [
        {
            "AutoScalingConfigurationArn": "arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability/2/e76562f50d78042e819fead0f59672e6",
            "AutoScalingConfigurationName": "high-availability",
            "AutoScalingConfigurationRevision": 2
        },
        {
            "AutoScalingConfigurationArn": "arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/low-cost/1/50d7804e7656fead0f59672e62f2e819",
            "AutoScalingConfigurationName": "low-cost",
            "AutoScalingConfigurationRevision": 1
        }
    ]
}
```
+  Einzelheiten zur API finden Sie [ListAutoScalingConfigurations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/list-auto-scaling-configurations.html)in der *AWS CLI Befehlsreferenz*. 

### `list-connections`
<a name="apprunner_ListConnections_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`list-connections`.

**AWS CLI**  
**Beispiel 1: So listen Sie alle Verbindungen auf**  
Das folgende `list-connections` Beispiel listet alle App Runner-Verbindungen im AWS Konto auf.  

```
aws apprunner list-connections
```
Ausgabe:  

```
{
    "ConnectionSummaryList": [
        {
            "ConnectionArn": "arn:aws:apprunner:us-east-1:123456789012:connection/my-github-connection",
            "ConnectionName": "my-github-connection",
            "Status": "AVAILABLE",
            "CreatedAt": "2020-11-03T00:32:51Z",
            "ProviderType": "GITHUB"
        },
        {
            "ConnectionArn": "arn:aws:apprunner:us-east-1:123456789012:connection/my-github-org-connection",
            "ConnectionName": "my-github-org-connection",
            "Status": "AVAILABLE",
            "CreatedAt": "2020-11-03T02:54:17Z",
            "ProviderType": "GITHUB"
        }
    ]
}
```
**Beispiel 2: So listen Sie eine Verbindung nach Namen auf**  
Im folgenden Beispiel für `list-connections` wird eine Verbindung nach ihrem Namen aufgelistet.  

```
aws apprunner list-connections \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ConnectionName": "my-github-org-connection"
}
```
Ausgabe:  

```
{
    "ConnectionSummaryList": [
        {
            "ConnectionArn": "arn:aws:apprunner:us-east-1:123456789012:connection/my-github-org-connection",
            "ConnectionName": "my-github-org-connection",
            "Status": "AVAILABLE",
            "CreatedAt": "2020-11-03T02:54:17Z",
            "ProviderType": "GITHUB"
        }
    ]
}
```
+  Einzelheiten zur API finden Sie [ListConnections](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/list-connections.html)in der *AWS CLI Befehlsreferenz*. 

### `list-operations`
<a name="apprunner_ListOperations_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`list-operations`.

**AWS CLI**  
**So listen Sie Operationen auf, die in einem Service ausgeführt wurden**  
Im folgenden Beispiel für `list-operations` werden alle Operationen aufgelistet, die bisher in einem App-Runner-Service ausgeführt wurden. In diesem Beispiel ist der Service neu und es wurde nur eine einzige Operation des Typs `CREATE_SERVICE` ausgeführt.  

```
aws apprunner list-operations \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa"
}
```
Ausgabe:  

```
{
    "OperationSummaryList": [
        {
            "EndedAt": 1606156217,
            "Id": "17fe9f55-7e91-4097-b243-fcabbb69a4cf",
            "StartedAt": 1606156014,
            "Status": "SUCCEEDED",
            "TargetArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa",
            "Type": "CREATE_SERVICE",
            "UpdatedAt": 1606156217
        }
    ]
}
```
+  Einzelheiten zur API finden Sie [ListOperations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/list-operations.html)in der *AWS CLI Befehlsreferenz*. 

### `list-services`
<a name="apprunner_ListServices_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`list-services`.

**AWS CLI**  
**So rufen Sie eine paginierte Liste der App-Runner-Services ab**  
Das folgende `list-services` Beispiel listet alle App Runner-Dienste im AWS Konto auf. In jeder Antwort sind bis zu zwei Services aufgeführt. Dieses Beispiel zeigt die erste Anforderung. Die Antwort enthält zwei Ergebnisse und ein Token, das in der nächsten Anforderung verwendet werden kann. Wenn eine nachfolgende Antwort kein Token enthält, wurden alle Services aufgelistet.  

```
aws apprunner list-services \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "MaxResults": 2
}
```
Ausgabe:  

```
{
    "NextToken": "eyJDdXN0b21lckFjY291bnRJZCI6IjI3MDIwNTQwMjg0NSIsIlNlcnZpY2VTdGF0dXNDb2RlIjoiUFJPVklTSU9OSU5HIiwiSGFzaEtleSI6IjI3MDIwNTQwMjg0NSNhYjhmOTRjZmUyOWE0NjBmYjg3NjBhZmQyZWU4NzU1NSJ9",
    "ServiceSummaryList": [
        {
            "CreatedAt": "2020-11-20T19:05:25Z",
            "UpdatedAt": "2020-11-23T12:41:37Z",
            "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa",
            "ServiceId": "8fe1e10304f84fd2b0df550fe98a71fa",
            "ServiceName": "python-app",
            "ServiceUrl": "psbqam834h.us-east-1.awsapprunner.com",
            "Status": "RUNNING"
        },
        {
            "CreatedAt": "2020-11-06T23:15:30Z",
            "UpdatedAt": "2020-11-23T13:21:22Z",
            "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/golang-container-app/ab8f94cfe29a460fb8760afd2ee87555",
            "ServiceId": "ab8f94cfe29a460fb8760afd2ee87555",
            "ServiceName": "golang-container-app",
            "ServiceUrl": "e2m8rrrx33.us-east-1.awsapprunner.com",
            "Status": "RUNNING"
        }
    ]
}
```
+  Einzelheiten zur API finden Sie [ListServices](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/list-services.html)in der *AWS CLI Befehlsreferenz*. 

### `list-tags-for-resource`
<a name="apprunner_ListTagsForResource_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`list-tags-for-resource`.

**AWS CLI**  
**So listen Sie Tags auf, die einem App-Runner-Service zugeordnet sind**  
Im folgenden Beispiel für `list-tags-for-resource` werden alle Tags aufgelistet, die einem App-Runner-Service zugeordnet sind.  

```
aws apprunner list-tags-for-resource \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ResourceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa"
}
```
Ausgabe:  

```
{
    "Tags": [
        {
            "Key": "Department",
            "Value": "Retail"
        },
        {
            "Key": "CustomerId",
            "Value": "56439872357912"
        }
    ]
}
```
+  Einzelheiten zur API finden Sie [ListTagsForResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/list-tags-for-resource.html)in der *AWS CLI Befehlsreferenz*. 

### `pause-service`
<a name="apprunner_PauseService_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`pause-service`.

**AWS CLI**  
**So halten Sie einen Service an**  
Im folgenden Beispiel für `pause-service` wird ein App-Runner-Service angehalten.  

```
aws apprunner pause-service \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa"
}
```
Ausgabe:  

```
{
    "OperationId": "17fe9f55-7e91-4097-b243-fcabbb69a4cf",
    "Service": {
        "CreatedAt": "2020-11-20T19:05:25Z",
        "UpdatedAt": "2020-11-23T12:41:37Z",
        "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa",
        "ServiceId": "8fe1e10304f84fd2b0df550fe98a71fa",
        "ServiceName": "python-app",
        "ServiceUrl": "psbqam834h.us-east-1.awsapprunner.com",
        "SourceConfiguration": {
            "AuthenticationConfiguration": {
                "ConnectionArn": "arn:aws:apprunner:us-east-1:123456789012:connection/my-github-connection/e7656250f67242d7819feade6800f59e"
            },
            "AutoDeploymentsEnabled": true,
            "CodeRepository": {
                "CodeConfiguration": {
                    "CodeConfigurationValues": {
                        "BuildCommand": "pip install -r requirements.txt",
                        "Port": "8080",
                        "Runtime": "PYTHON_3",
                        "RuntimeEnvironmentVariables": [
                            {
                                "NAME": "Jane"
                            }
                        ],
                        "StartCommand": "python server.py"
                    },
                    "ConfigurationSource": "Api"
                },
                "RepositoryUrl": "https://github.com/my-account/python-hello",
                "SourceCodeVersion": {
                    "Type": "BRANCH",
                    "Value": "main"
                }
            }
        },
        "Status": "OPERATION_IN_PROGRESS",
        "InstanceConfiguration": {
            "CPU": "1 vCPU",
            "Memory": "3 GB"
        }
    }
}
```
+  Einzelheiten zur API finden Sie [PauseService](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/pause-service.html)in der *AWS CLI Befehlsreferenz*. 

### `resume-service`
<a name="apprunner_ResumeService_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`resume-service`.

**AWS CLI**  
**So nehmen Sie einen Service wieder auf**  
Im folgenden Beispiel für `resume-service` wird ein App-Runner-Service wieder aufgenommen.  

```
aws apprunner resume-service \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa"
}
```
Ausgabe:  

```
{
    "OperationId": "17fe9f55-7e91-4097-b243-fcabbb69a4cf",
    "Service": {
        "CreatedAt": "2020-11-20T19:05:25Z",
        "UpdatedAt": "2020-11-23T12:41:37Z",
        "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa",
        "ServiceId": "8fe1e10304f84fd2b0df550fe98a71fa",
        "ServiceName": "python-app",
        "ServiceUrl": "psbqam834h.us-east-1.awsapprunner.com",
        "SourceConfiguration": {
            "AuthenticationConfiguration": {
                "ConnectionArn": "arn:aws:apprunner:us-east-1:123456789012:connection/my-github-connection/e7656250f67242d7819feade6800f59e"
            },
            "AutoDeploymentsEnabled": true,
            "CodeRepository": {
                "CodeConfiguration": {
                    "CodeConfigurationValues": {
                        "BuildCommand": "pip install -r requirements.txt",
                        "Port": "8080",
                        "Runtime": "PYTHON_3",
                        "RuntimeEnvironmentVariables": [
                            {
                                "NAME": "Jane"
                            }
                        ],
                        "StartCommand": "python server.py"
                    },
                    "ConfigurationSource": "Api"
                },
                "RepositoryUrl": "https://github.com/my-account/python-hello",
                "SourceCodeVersion": {
                    "Type": "BRANCH",
                    "Value": "main"
                }
            }
        },
        "Status": "OPERATION_IN_PROGRESS",
        "InstanceConfiguration": {
            "CPU": "1 vCPU",
            "Memory": "3 GB"
        }
    }
}
```
+  Einzelheiten zur API finden Sie [ResumeService](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/resume-service.html)in der *AWS CLI Befehlsreferenz*. 

### `start-deployment`
<a name="apprunner_StartDeployment_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`start-deployment`.

**AWS CLI**  
**So initiieren Sie eine manuelle Bereitstellung**  
Im folgenden Beispiel für `start-deployment` wird eine manuelle Bereitstellung für einen App-Runner-Service durchgeführt.  

```
aws apprunner start-deployment \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa"
}
```
Ausgabe:  

```
{
    "OperationId": "853a7d5b-fc9f-4730-831b-fd8037ab832a"
}
```
+  Einzelheiten zur API finden Sie [StartDeployment](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/start-deployment.html)in der *AWS CLI Befehlsreferenz*. 

### `tag-resource`
<a name="apprunner_TagResource_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`tag-resource`.

**AWS CLI**  
**So fügen Sie einem App-Runner-Service Tags hinzu**  
Im folgenden Beispiel für `tag-resource` werden einem App-Runner-Service zwei Tag hinzugefügt.  

```
aws apprunner tag-resource \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ResourceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa",
    "Tags": [
        {
            "Key": "Department",
            "Value": "Retail"
        },
        {
            "Key": "CustomerId",
            "Value": "56439872357912"
        }
    ]
}
```
Mit diesem Befehl wird keine Ausgabe zurückgegeben.  
+  Einzelheiten zur API finden Sie [TagResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/tag-resource.html)in der *AWS CLI Befehlsreferenz*. 

### `untag-resource`
<a name="apprunner_UntagResource_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`untag-resource`.

**AWS CLI**  
**So entfernen Sie Tags aus einem App-Runner-Service**  
Im folgenden Beispiel für `untag-resource` werden zwei Tags aus einem App-Runner-Service entfernt.  

```
aws apprunner untag-resource \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ResourceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa",
    "TagKeys": [
        "Department",
        "CustomerId"
    ]
}
```
Mit diesem Befehl wird keine Ausgabe zurückgegeben.  
+  Einzelheiten zur API finden Sie [UntagResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/untag-resource.html)in der *AWS CLI Befehlsreferenz*. 

### `update-service`
<a name="apprunner_UpdateService_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`update-service`.

**AWS CLI**  
**So aktualisieren Sie die Speichergröße**  
Im folgenden Beispiel für `update-service` wird die Speichergröße von Instances (Skalierungseinheiten) eines App-Runner-Service auf 2 048 MiB aktualisiert.  
Wenn der Aufruf erfolgreich ist, startet App Runner einen asynchronen Aktualisierungsprozess. Die `Service`-Struktur, die durch den Aufruf zurückgegeben wird, spiegelt den neuen Speicherwert wider, der durch diesen Aufruf angewendet wird.  

```
aws apprunner update-service \
    --cli-input-json file://input.json
```
Inhalt von `input.json`:  

```
{
    "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa",
    "InstanceConfiguration": {
        "Memory": "4 GB"
    }
}
```
Ausgabe:  

```
{
    "OperationId": "17fe9f55-7e91-4097-b243-fcabbb69a4cf",
    "Service": {
        "CreatedAt": "2020-11-20T19:05:25Z",
        "UpdatedAt": "2020-11-23T12:41:37Z",
        "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa",
        "ServiceId": "8fe1e10304f84fd2b0df550fe98a71fa",
        "ServiceName": "python-app",
        "ServiceUrl": "psbqam834h.us-east-1.awsapprunner.com",
        "SourceConfiguration": {
            "AuthenticationConfiguration": {
                "ConnectionArn": "arn:aws:apprunner:us-east-1:123456789012:connection/my-github-connection/e7656250f67242d7819feade6800f59e"
            },
            "AutoDeploymentsEnabled": true,
            "CodeRepository": {
                "CodeConfiguration": {
                    "CodeConfigurationValues": {
                        "BuildCommand": "pip install -r requirements.txt",
                        "Port": "8080",
                        "Runtime": "PYTHON_3",
                        "RuntimeEnvironmentVariables": [
                            {
                                "NAME": "Jane"
                            }
                        ],
                        "StartCommand": "python server.py"
                    },
                    "ConfigurationSource": "Api"
                },
                "RepositoryUrl": "https://github.com/my-account/python-hello",
                "SourceCodeVersion": {
                    "Type": "BRANCH",
                    "Value": "main"
                }
            }
        },
        "Status": "OPERATION_IN_PROGRESS",
        "InstanceConfiguration": {
            "CPU": "1 vCPU",
            "Memory": "4 GB"
        }
    }
}
```
+  Einzelheiten zur API finden Sie [UpdateService](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/update-service.html)in der *AWS CLI Befehlsreferenz*. 