

Ada lebih banyak contoh AWS SDK yang tersedia di repo Contoh [SDK AWS Doc](https://github.com/awsdocs/aws-doc-sdk-examples). GitHub 

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# Contoh App Runner menggunakan AWS CLI
<a name="cli_2_apprunner_code_examples"></a>

Contoh kode berikut menunjukkan cara melakukan tindakan dan mengimplementasikan skenario umum menggunakan AWS Command Line Interface With App Runner.

*Tindakan* merupakan kutipan kode dari program yang lebih besar dan harus dijalankan dalam konteks. Sementara tindakan menunjukkan cara memanggil fungsi layanan individual, Anda dapat melihat tindakan dalam konteks dalam skenario terkait.

Setiap contoh menyertakan tautan ke kode sumber lengkap, di mana Anda dapat menemukan instruksi tentang cara mengatur dan menjalankan kode dalam konteks.

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

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

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

Contoh kode berikut menunjukkan cara menggunakan`associate-custom-domain`.

**AWS CLI**  
**Untuk mengaitkan nama domain dan subdomain www dengan layanan**  
`associate-custom-domain`Contoh berikut mengaitkan nama domain kustom yang Anda kontrol dengan layanan App Runner. Nama domain adalah domain root`example.com`, termasuk subdomain kasus khusus. `www.example.com`  

```
aws apprunner associate-custom-domain \
    --cli-input-json file://input.json
```
Isi dari `input.json`:  

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

```
{
    "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"
}
```
+  Untuk detail API, lihat [AssociateCustomDomain](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/associate-custom-domain.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`create-auto-scaling-configuration`.

**AWS CLI**  
**Untuk membuat konfigurasi penskalaan otomatis ketersediaan tinggi**  
`create-auto-scaling-configuration`Contoh berikut membuat konfigurasi penskalaan otomatis yang dioptimalkan untuk ketersediaan tinggi dengan menyetel `MinSize` ke 5. Dengan konfigurasi ini, App Runner mencoba menyebarkan instans layanan Anda ke sebagian besar Availability Zone, hingga lima, tergantung pada AWS Wilayah.  
Panggilan mengembalikan `AutoScalingConfiguration` objek dengan pengaturan lain yang disetel ke defaultnya. Dalam contoh, ini adalah panggilan pertama untuk membuat konfigurasi bernama`high-availability`. Revisi diatur ke 1, dan ini adalah revisi terbaru.  

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

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

```
{
    "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
    }
}
```
+  Untuk detail API, lihat [CreateAutoScalingConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/create-auto-scaling-configuration.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`create-connection`.

**AWS CLI**  
**Untuk membuat GitHub koneksi**  
`create-connection`Contoh berikut membuat koneksi ke repositori GitHub kode pribadi. Status koneksi setelah panggilan berhasil adalah`PENDING_HANDSHAKE`. Ini karena jabat tangan otentikasi dengan penyedia masih belum terjadi. Selesaikan jabat tangan menggunakan konsol App Runner.  

```
aws apprunner create-connection \
    --cli-input-json file://input.json
```
Isi dari `input.json`:  

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

```
{
    "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"
    }
}
```
Untuk informasi selengkapnya, lihat [Mengelola koneksi App Runner](https://docs.aws.amazon.com/apprunner/latest/dg/manage-connections.html) di Panduan *Pengembang AWS App Runner*.  
+  Untuk detail API, lihat [CreateConnection](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/create-connection.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`create-service`.

**AWS CLI**  
**Contoh 1: Untuk membuat layanan repositori kode sumber**  
`create-service`Contoh berikut membuat layanan App Runner berdasarkan repositori kode sumber Python.  

```
aws apprunner create-service \
    --cli-input-json file://input.json
```
Isi dari `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"
    }
}
```
Output:  

```
{
    "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"
        }
    }
}
```
**Contoh 2: Untuk membuat layanan repositori kode sumber**  
`create-service`Contoh berikut membuat layanan App Runner berdasarkan repositori kode sumber Python.  

```
aws apprunner create-service \
    --cli-input-json file://input.json
```
Isi dari `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"
    }
}
```
Output:  

```
{
    "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"
        }
    }
}
```
**Contoh 3: Untuk membuat layanan repositori gambar sumber**  
`create-service`Contoh berikut membuat layanan App Runner berdasarkan gambar yang disimpan di Elastic Container Registry (ECR).  

```
aws apprunner create-service \
    --cli-input-json file://input.json
```
Isi dari `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"
    }
}
```
Output:  

```
{
    "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"
        }
    }
}
```
+  Untuk detail API, lihat [CreateService](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/create-service.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`delete-auto-scaling-configuration`.

**AWS CLI**  
**Contoh 1: Untuk menghapus revisi aktif terbaru dari konfigurasi penskalaan otomatis**  
`delete-auto-scaling-configuration`Contoh berikut menghapus revisi aktif terbaru dari konfigurasi penskalaan otomatis App Runner. Untuk menghapus revisi aktif terbaru, tentukan Nama Sumber Daya Amazon (ARN) yang diakhiri dengan nama konfigurasi, tanpa komponen revisi.  
Dalam contoh, ada dua revisi sebelum tindakan ini. Oleh karena itu, revisi 2 (yang terbaru) dihapus. Namun, sekarang ditampilkan`"Latest": false`, karena, setelah dihapus, itu bukan revisi aktif terbaru lagi.  

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

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

```
{
    "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
    }
}
```
**Contoh 2: Untuk menghapus revisi tertentu dari konfigurasi penskalaan otomatis**  
`delete-auto-scaling-configuration`Contoh berikut menghapus revisi spesifik konfigurasi penskalaan otomatis App Runner. Untuk menghapus revisi tertentu, tentukan ARN yang menyertakan nomor revisi.  
Dalam contoh, beberapa revisi ada sebelum tindakan ini. Tindakan menghapus `1` revisi.  

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

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

```
{
    "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
    }
}
```
+  Untuk detail API, lihat [DeleteAutoScalingConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/delete-auto-scaling-configuration.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`delete-connection`.

**AWS CLI**  
**Untuk menghapus koneksi**  
`delete-connection`Contoh berikut menghapus koneksi App Runner. Status koneksi setelah panggilan berhasil adalah`DELETED`. Ini karena koneksi tidak lagi tersedia.  

```
aws apprunner delete-connection \
    --cli-input-json file://input.json
```
Isi dari `input.json`:  

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

```
{
    "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"
    }
}
```
+  Untuk detail API, lihat [DeleteConnection](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/delete-connection.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`delete-service`.

**AWS CLI**  
**Untuk menghapus layanan**  
`delete-service`Contoh berikut menghapus layanan App Runner.  

```
aws apprunner delete-service \
    --cli-input-json file://input.json
```
Isi dari `input.json`:  

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

```
{
    "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"
        }
    }
}
```
+  Untuk detail API, lihat [DeleteService](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/delete-service.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`describe-auto-scaling-configuration`.

**AWS CLI**  
**Contoh 1: Untuk menjelaskan revisi aktif terbaru dari konfigurasi penskalaan otomatis**  
`describe-auto-scaling-configuration`Contoh berikut mendapatkan deskripsi revisi aktif terbaru dari konfigurasi penskalaan otomatis App Runner. Untuk menjelaskan revisi aktif terbaru, tentukan ARN yang diakhiri dengan nama konfigurasi, tanpa komponen revisi.  
Dalam contoh, ada dua revisi. Oleh karena itu, revisi `2` (terbaru) dijelaskan. Objek yang dihasilkan menunjukkan`"Latest": true`.  

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

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

```
{
    "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
    }
}
```
**Contoh 2: Untuk menjelaskan revisi spesifik dari konfigurasi penskalaan otomatis**  
`describe-auto-scaling-configuration`Contoh berikut mendapatkan deskripsi revisi spesifik konfigurasi penskalaan otomatis App Runner. Untuk menggambarkan revisi tertentu, tentukan ARN yang menyertakan nomor revisi.  
Dalam contoh, beberapa revisi ada dan revisi `1` ditanyakan. Objek yang dihasilkan menunjukkan`"Latest": false`.  

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

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

```
{
    "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
    }
}
```
+  Untuk detail API, lihat [DescribeAutoScalingConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/describe-auto-scaling-configuration.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`describe-custom-domains`.

**AWS CLI**  
**Untuk mendapatkan deskripsi nama domain khusus yang terkait dengan layanan**  
`describe-custom-domains`Contoh berikut mendapatkan deskripsi dan status nama domain kustom yang terkait dengan layanan App Runner.  

```
aws apprunner describe-custom-domains \
    --cli-input-json file://input.json
```
Isi dari `input.json`:  

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

```
{
    "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"
}
```
+  Untuk detail API, lihat [DescribeCustomDomains](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/describe-custom-domains.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`describe-service`.

**AWS CLI**  
**Untuk mendeskripsikan layanan**  
`describe-service`Contoh berikut mendapatkan deskripsi layanan App Runner.  

```
aws apprunner describe-service \
    --cli-input-json file://input.json
```
Isi dari `input.json`:  

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

```
{
    "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"
        }
    }
}
```
+  Untuk detail API, lihat [DescribeService](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/describe-service.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`disassociate-custom-domain`.

**AWS CLI**  
**Untuk memisahkan nama domain dari layanan**  
`disassociate-custom-domain`Contoh berikut memisahkan domain `example.com` dari layanan App Runner. Panggilan juga melepaskan subdomain `www.example.com` yang dikaitkan bersama dengan domain root.  

```
aws apprunner disassociate-custom-domain \
    --cli-input-json file://input.json
```
Isi dari `input.json`:  

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

```
{
    "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"
}
```
+  Untuk detail API, lihat [DisassociateCustomDomain](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/disassociate-custom-domain.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`list-auto-scaling-configurations`.

**AWS CLI**  
**Untuk mendapatkan daftar paginasi konfigurasi penskalaan otomatis App Runner**  
`list-auto-scaling-configurations`Contoh berikut mencantumkan semua konfigurasi penskalaan otomatis App Runner di akun Anda. AWS Hingga lima konfigurasi penskalaan otomatis tercantum di setiap respons. `AutoScalingConfigurationName`dan `LatestOnly` tidak ditentukan. Defaultnya menyebabkan revisi terbaru dari semua konfigurasi aktif terdaftar.  
Dalam contoh ini, respons mencakup dua hasil dan tidak ada yang tambahan, jadi `NextToken` tidak dikembalikan.  

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

```
{
    "MaxResults": 5
}
```
Output:  

```
{
    "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
        }
    ]
}
```
+  Untuk detail API, lihat [ListAutoScalingConfigurations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/list-auto-scaling-configurations.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`list-connections`.

**AWS CLI**  
**Contoh 1: Untuk daftar semua koneksi**  
`list-connections`Contoh berikut mencantumkan semua koneksi App Runner di AWS akun.  

```
aws apprunner list-connections
```
Output:  

```
{
    "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"
        }
    ]
}
```
**Contoh 2: Untuk membuat daftar koneksi dengan nama**  
`list-connections`Contoh berikut mencantumkan koneksi dengan namanya.  

```
aws apprunner list-connections \
    --cli-input-json file://input.json
```
Isi dari `input.json`:  

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

```
{
    "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"
        }
    ]
}
```
+  Untuk detail API, lihat [ListConnections](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/list-connections.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`list-operations`.

**AWS CLI**  
**Untuk membuat daftar operasi yang terjadi pada servicee**  
`list-operations`Contoh berikut mencantumkan semua operasi yang terjadi pada layanan App Runner sejauh ini. Dalam contoh ini, layanan ini baru dan hanya satu operasi tipe yang `CREATE_SERVICE` telah terjadi.  

```
aws apprunner list-operations \
    --cli-input-json file://input.json
```
Isi dari `input.json`:  

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

```
{
    "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
        }
    ]
}
```
+  Untuk detail API, lihat [ListOperations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/list-operations.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`list-services`.

**AWS CLI**  
**Untuk mendapatkan daftar paginasi layanan App Runner**  
`list-services`Contoh berikut mencantumkan semua layanan App Runner di AWS akun. Hingga dua layanan tercantum dalam setiap tanggapan. Contoh ini menunjukkan permintaan pertama. Respons mencakup dua hasil dan token yang dapat digunakan dalam permintaan berikutnya. Ketika respons berikutnya tidak menyertakan token, semua layanan telah terdaftar.  

```
aws apprunner list-services \
    --cli-input-json file://input.json
```
Isi dari `input.json`:  

```
{
    "MaxResults": 2
}
```
Output:  

```
{
    "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"
        }
    ]
}
```
+  Untuk detail API, lihat [ListServices](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/list-services.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`list-tags-for-resource`.

**AWS CLI**  
**Untuk mencantumkan tag yang terkait dengan layanan App Runner**  
`list-tags-for-resource`Contoh berikut mencantumkan semua tag yang terkait dengan layanan App Runner.  

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

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

```
{
    "Tags": [
        {
            "Key": "Department",
            "Value": "Retail"
        },
        {
            "Key": "CustomerId",
            "Value": "56439872357912"
        }
    ]
}
```
+  Untuk detail API, lihat [ListTagsForResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/list-tags-for-resource.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`pause-service`.

**AWS CLI**  
**Untuk menjeda layanan**  
`pause-service`Contoh berikut menjeda layanan App Runner.  

```
aws apprunner pause-service \
    --cli-input-json file://input.json
```
Isi dari `input.json`:  

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

```
{
    "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"
        }
    }
}
```
+  Untuk detail API, lihat [PauseService](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/pause-service.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`resume-service`.

**AWS CLI**  
**Untuk melanjutkan layanan**  
`resume-service`Contoh berikut melanjutkan layanan App Runner.  

```
aws apprunner resume-service \
    --cli-input-json file://input.json
```
Isi dari `input.json`:  

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

```
{
    "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"
        }
    }
}
```
+  Untuk detail API, lihat [ResumeService](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/resume-service.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`start-deployment`.

**AWS CLI**  
**Untuk memulai penerapan manual**  
`start-deployment`Contoh berikut melakukan penerapan manual ke layanan App Runner.  

```
aws apprunner start-deployment \
    --cli-input-json file://input.json
```
Isi dari `input.json`:  

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

```
{
    "OperationId": "853a7d5b-fc9f-4730-831b-fd8037ab832a"
}
```
+  Untuk detail API, lihat [StartDeployment](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/start-deployment.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`tag-resource`.

**AWS CLI**  
**Untuk menambahkan tag ke layanan App Runner**  
`tag-resource`Contoh berikut menambahkan dua tag ke layanan App Runner.  

```
aws apprunner tag-resource \
    --cli-input-json file://input.json
```
Isi dari `input.json`:  

```
{
    "ResourceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa",
    "Tags": [
        {
            "Key": "Department",
            "Value": "Retail"
        },
        {
            "Key": "CustomerId",
            "Value": "56439872357912"
        }
    ]
}
```
Perintah ini tidak menghasilkan output.  
+  Untuk detail API, lihat [TagResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/tag-resource.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`untag-resource`.

**AWS CLI**  
**Untuk menghapus tag dari layanan App Runner**  
`untag-resource`Contoh berikut menghapus dua tag dari layanan App Runner.  

```
aws apprunner untag-resource \
    --cli-input-json file://input.json
```
Isi dari `input.json`:  

```
{
    "ResourceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa",
    "TagKeys": [
        "Department",
        "CustomerId"
    ]
}
```
Perintah ini tidak menghasilkan output.  
+  Untuk detail API, lihat [UntagResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/untag-resource.html)di *Referensi AWS CLI Perintah*. 

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

Contoh kode berikut menunjukkan cara menggunakan`update-service`.

**AWS CLI**  
**Untuk memperbarui ukuran memori**  
`update-service`Contoh berikut memperbarui ukuran memori instance (unit penskalaan) layanan App Runner menjadi 2048 MiB.  
Ketika panggilan berhasil, App Runner memulai proses pembaruan asinkron. `Service`Struktur yang dikembalikan oleh panggilan mencerminkan nilai memori baru yang sedang diterapkan oleh panggilan ini.  

```
aws apprunner update-service \
    --cli-input-json file://input.json
```
Isi dari `input.json`:  

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

```
{
    "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"
        }
    }
}
```
+  Untuk detail API, lihat [UpdateService](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apprunner/update-service.html)di *Referensi AWS CLI Perintah*. 