

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 API Gateway menggunakan AWS CLI
<a name="cli_2_api-gateway_code_examples"></a>

Contoh kode berikut menunjukkan cara melakukan tindakan dan mengimplementasikan skenario umum dengan menggunakan API Gateway AWS Command Line Interface with.

*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>

### `create-api-key`
<a name="api-gateway_CreateApiKey_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-api-key`.

**AWS CLI**  
**Untuk membuat kunci API yang diaktifkan untuk API dan Stage yang ada**  
Perintah:  

```
aws apigateway create-api-key --name 'Dev API Key' --description 'Used for development' --enabled --stage-keys restApiId='a1b2c3d4e5',stageName='dev'
```
+  Untuk detail API, lihat [CreateApiKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-api-key.html)di *Referensi AWS CLI Perintah*. 

### `create-authorizer`
<a name="api-gateway_CreateAuthorizer_cli_2_topic"></a>

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

**AWS CLI**  
**Contoh 1: Untuk membuat Otorisasi Kustom API Gateway berbasis token untuk API**  
`create-authorizer`Contoh berikut membuat authorizer berbasis token.  

```
aws apigateway create-authorizer \
    --rest-api-id 1234123412 \
    --name 'First_Token_Custom_Authorizer' \
    --type TOKEN \
    --authorizer-uri 'arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:123412341234:function:customAuthFunction/invocations' \
    --identity-source 'method.request.header.Authorization' \
    --authorizer-result-ttl-in-seconds 300
```
Output:  

```
{
    "authType": "custom",
    "name": "First_Token_Custom_Authorizer",
    "authorizerUri": "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:123412341234:function:customAuthFunction/invocations",
    "authorizerResultTtlInSeconds": 300,
    "identitySource": "method.request.header.Authorization",
    "type": "TOKEN",
    "id": "z40xj0"
}
```
**Contoh 2: Untuk membuat Otorisasi Kustom API Gateway berbasis Cognito User Pools untuk API**  
`create-authorizer`Contoh berikut membuat Otorisasi Kustom API Gateway berbasis Cognito User Pools.  

```
aws apigateway create-authorizer \
    --rest-api-id 1234123412 \
    --name 'First_Cognito_Custom_Authorizer' \
    --type COGNITO_USER_POOLS \
    --provider-arns 'arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_aWcZeQbuD' \
    --identity-source 'method.request.header.Authorization'
```
Output:  

```
{
    "authType": "cognito_user_pools",
    "identitySource": "method.request.header.Authorization",
    "name": "First_Cognito_Custom_Authorizer",
    "providerARNs": [
        "arn:aws:cognito-idp:us-east-1:342398297714:userpool/us-east-1_qWbZzQhzE"
    ],
    "type": "COGNITO_USER_POOLS",
    "id": "5yid1t"
}
```
**Contoh 3: Untuk membuat API Gateway Custom Authorizer berbasis permintaan untuk API**  
`create-authorizer`Contoh berikut membuat authorizer berbasis permintaan.  

```
aws apigateway create-authorizer \
    --rest-api-id 1234123412 \
    --name 'First_Request_Custom_Authorizer' \
    --type REQUEST \
    --authorizer-uri 'arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:123412341234:function:customAuthFunction/invocations' \
    --identity-source 'method.request.header.Authorization,context.accountId' \
    --authorizer-result-ttl-in-seconds 300
```
Output:  

```
{
    "id": "z40xj0",
    "name": "First_Request_Custom_Authorizer",
    "type": "REQUEST",
    "authType": "custom",
    "authorizerUri": "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:123412341234:function:customAuthFunction/invocations",
    "identitySource": "method.request.header.Authorization,context.accountId",
    "authorizerResultTtlInSeconds": 300
}
```
+  Untuk detail API, lihat [CreateAuthorizer](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-authorizer.html)di *Referensi AWS CLI Perintah*. 

### `create-base-path-mapping`
<a name="api-gateway_CreateBasePathMapping_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-base-path-mapping`.

**AWS CLI**  
**Untuk membuat pemetaan jalur dasar untuk nama domain kustom**  
Perintah:  

```
aws apigateway create-base-path-mapping --domain-name subdomain.domain.tld --rest-api-id 1234123412 --stage prod --base-path v1
```
+  Untuk detail API, lihat [CreateBasePathMapping](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-base-path-mapping.html)di *Referensi AWS CLI Perintah*. 

### `create-deployment`
<a name="api-gateway_CreateDeployment_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk menerapkan sumber daya yang dikonfigurasi untuk API ke Tahap baru**  
Perintah:  

```
aws apigateway create-deployment --rest-api-id 1234123412 --stage-name dev --stage-description 'Development Stage' --description 'First deployment to the dev stage'
```
**Untuk menerapkan sumber daya yang dikonfigurasi untuk API ke tahap yang ada**  
Perintah:  

```
aws apigateway create-deployment --rest-api-id 1234123412 --stage-name dev --description 'Second deployment to the dev stage'
```
**Untuk menerapkan sumber daya yang dikonfigurasi untuk API ke tahap yang ada dengan Variabel Tahap**  
aws apigateway create-deployment -- rest-api-id 1234123412 --stage-name dev --description 'Penerapan ketiga ke tahap dev' --variable key='value', otherKey='otherValue'  
+  Untuk detail API, lihat [CreateDeployment](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-deployment.html)di *Referensi AWS CLI Perintah*. 

### `create-domain-name-access-association`
<a name="api-gateway_CreateDomainNameAccessAssociation_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-domain-name-access-association`.

**AWS CLI**  
**Untuk membuat asosiasi akses nama domain**  
`create-domain-name-access-association`Contoh berikut membuat asosiasi akses nama domain antara nama domain kustom pribadi dan titik akhir VPC.  

```
aws apigateway create-domain-name-access-association \
    --domain-name-arn arn:aws:apigateway:us-west-2:111122223333:/domainnames/my.private.domain.tld+abcd1234 \
    --access-association-source vpce-abcd1234efg \
    --access-association-source-type VPCE
```
Output:  

```
{
    "domainNameAccessAssociationArn": "arn:aws:apigateway:us-west-2:012345678910:/domainnameaccessassociations/domainname/my.private.domain.tld/vpcesource/vpce-abcd1234efg
    "accessAssociationSource": "vpce-abcd1234efg",
    "accessAssociationSourceType": "VPCE",
    "domainNameArn" : "arn:aws:apigateway:us-west-2:111122223333:/domainnames/private.example.com+abcd1234"
}
```
Untuk informasi selengkapnya, lihat [Nama domain khusus untuk pribadi APIs di API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-custom-domains.html) di *Panduan Pengembang Amazon API Gateway*.  
+  Untuk detail API, lihat [CreateDomainNameAccessAssociation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-domain-name-access-association.html)di *Referensi AWS CLI Perintah*. 

### `create-domain-name`
<a name="api-gateway_CreateDomainName_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-domain-name`.

**AWS CLI**  
**Contoh 1: Untuk membuat nama domain kustom publik**  
`create-domain-name`Contoh berikut membuat nama domain kustom publik.  

```
aws apigateway create-domain-name \
    --domain-name 'my.domain.tld' \
    --certificate-name 'my.domain.tld cert'\
    --certificate-arn 'arn:aws:acm:us-east-1:012345678910:certificate/fb1b9770-a305-495d-aefb-27e5e101ff3'
```
Output:  

```
{
    "domainName": "my.domain.tld",
    "certificateName": "my.domain.tld cert",
    "certificateArn": "arn:aws:acm:us-east-1:012345678910:certificate/fb1b9770-a305-495d-aefb-27e5e101ff3",
    "certificateUploadDate": "2024-10-08T11:29:49-07:00",
    "distributionDomainName": "abcd1234.cloudfront.net",
    "distributionHostedZoneId": "Z2FDTNDATAQYW2",
    "endpointConfiguration": {
        "types": [
            "EDGE"
        ]
    },
    "domainNameStatus": "AVAILABLE",
    "securityPolicy": "TLS_1_2"
}
```
Untuk informasi selengkapnya, lihat [Nama domain khusus untuk REST publik APIs di API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) di *Panduan Pengembang Amazon API Gateway*.  
**Contoh 2: Untuk membuat nama domain kustom pribadi**  
`create-domain-name`Contoh berikut membuat nama domain kustom pribadi.  

```
aws apigateway create-domain-name \
    --domain-name 'my.private.domain.tld' \
    --certificate-name 'my.domain.tld cert' \
    --certificate-arn 'arn:aws:acm:us-east-1:012345678910:certificate/fb1b9770-a305-495d-aefb-27e5e101ff3' \
    --endpoint-configuration '{"types": ["PRIVATE"]}' \
    --security-policy 'TLS_1_2' \
    --policy file://policy.json
```
Isi dari `policy.json`:  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": "*",
            "Action": "execute-api:Invoke",
            "Resource": [
                "execute-api:/*"
            ]
        },
        {
            "Effect": "Deny",
            "Principal": "*",
            "Action": "execute-api:Invoke",
            "Resource": [
                "execute-api:/*"
            ],
            "Condition" : {
                "StringNotEquals": {
                    "aws:SourceVpce": "vpce-abcd1234efg"
                }
            }
        }
    ]
}
```
Output:  

```
{
    "domainName": "my.private.domain.tld",
    "domainNameId": "abcd1234",
    "domainNameArn": "arn:aws:apigateway:us-east-1:012345678910:/domainnames/my.private.domain.tld+abcd1234",
    "certificateArn": "arn:aws:acm:us-east-1:012345678910:certificate/fb1b9770-a305-495d-aefb-27e5e101ff3",
    "certificateUploadDate": "2024-09-10T10:31:20-07:00",
    "endpointConfiguration": {
        "types": [
            "PRIVATE"
        ]
    },
    "domainNameStatus": "AVAILABLE",
    "securityPolicy": "TLS_1_2",
    "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"execute-api:Invoke\",\"Resource\":\"arn:aws:execute-api:us-east-1:012345678910:/domainnames/my.private.domain.tld+abcd1234\"},{\"Effect\":\"Deny\",\"Principal\":\"*\",\"Action\":\"execute-api:Invoke\",\"Resource\":\"arn:aws:execute-api:us-east-1:012345678910:/domainnames/my.private.domain.tld+abcd1234\",\"Condition\":{\"StringNotEquals\":{\"aws:SourceVpc\":\"vpc-1a2b3c4d\"}}}]}"
}
```
Untuk informasi selengkapnya, lihat [Nama domain khusus untuk REST publik APIs di API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) di *Panduan Pengembang Amazon API Gateway*.  
+  Untuk detail API, lihat [CreateDomainName](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-domain-name.html)di *Referensi AWS CLI Perintah*. 

### `create-model`
<a name="api-gateway_CreateModel_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk membuat model untuk API**  
Perintah:  

```
aws apigateway create-model --rest-api-id 1234123412 --name 'firstModel' --description 'The First Model' --content-type 'application/json'  --schema '{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "firstModel", "type": "object", "properties": { "firstProperty" : { "type": "object", "properties": { "key": { "type": "string" } } } } }'
```
Output:  

```
{
    "contentType": "application/json",
    "description": "The First Model",
    "name": "firstModel",
    "id": "2rzg0l",
    "schema": "{ \"$schema\": \"http://json-schema.org/draft-04/schema#\", \"title\": \"firstModel\", \"type\": \"object\", \"properties\": { \"firstProperty\" : { \"type\": \"object\", \"properties\": { \"key\": { \"type\": \"string\" } } } } }"
}
```
+  Untuk detail API, lihat [CreateModel](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-model.html)di *Referensi AWS CLI Perintah*. 

### `create-resource`
<a name="api-gateway_CreateResource_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk membuat sumber daya di API**  
Perintah:  

```
aws apigateway create-resource --rest-api-id 1234123412 --parent-id a1b2c3 --path-part 'new-resource'
```
+  Untuk detail API, lihat [CreateResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-resource.html)di *Referensi AWS CLI Perintah*. 

### `create-rest-api`
<a name="api-gateway_CreateRestApi_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-rest-api`.

**AWS CLI**  
**Untuk membuat API**  
Perintah:  

```
aws apigateway create-rest-api --name 'My First API' --description 'This is my first API'
```
**Untuk membuat API duplikat dari API yang ada**  
Perintah:  

```
aws apigateway create-rest-api --name 'Copy of My First API' --description 'This is a copy of my first API' --clone-from 1234123412
```
+  Untuk detail API, lihat [CreateRestApi](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-rest-api.html)di *Referensi AWS CLI Perintah*. 

### `create-stage`
<a name="api-gateway_CreateStage_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk membuat tahap dalam API yang akan berisi penerapan yang ada**  
Perintah:  

```
aws apigateway create-stage --rest-api-id 1234123412 --stage-name 'dev' --description 'Development stage' --deployment-id a1b2c3
```
**Untuk membuat tahap dalam API yang akan berisi penerapan yang ada dan Variabel Tahap kustom**  
Perintah:  

```
aws apigateway create-stage --rest-api-id 1234123412 --stage-name 'dev' --description 'Development stage' --deployment-id a1b2c3 --variables key='value',otherKey='otherValue'
```
+  Untuk detail API, lihat [CreateStage](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-stage.html)di *Referensi AWS CLI Perintah*. 

### `create-usage-plan-key`
<a name="api-gateway_CreateUsagePlanKey_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-usage-plan-key`.

**AWS CLI**  
**Kaitkan kunci API yang ada dengan Paket Penggunaan**  
Perintah:  

```
aws apigateway create-usage-plan-key --usage-plan-id a1b2c3 --key-type "API_KEY" --key-id 4vq3yryqm5
```
+  Untuk detail API, lihat [CreateUsagePlanKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-usage-plan-key.html)di *Referensi AWS CLI Perintah*. 

### `create-usage-plan`
<a name="api-gateway_CreateUsagePlan_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-usage-plan`.

**AWS CLI**  
**Untuk membuat paket penggunaan dengan batas throttle dan kuota yang disetel ulang di awal bulan**  
Perintah:  

```
aws apigateway create-usage-plan --name "New Usage Plan" --description "A new usage plan" --throttle burstLimit=10,rateLimit=5 --quota limit=500,offset=0,period=MONTH
```
+  Untuk detail API, lihat [CreateUsagePlan](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-usage-plan.html)di *Referensi AWS CLI Perintah*. 

### `delete-api-key`
<a name="api-gateway_DeleteApiKey_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-api-key`.

**AWS CLI**  
**Untuk menghapus kunci API**  
Perintah:  

```
aws apigateway delete-api-key --api-key 8bklk8bl1k3sB38D9B3l0enyWT8c09B30lkq0blk
```
+  Untuk detail API, lihat [DeleteApiKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-api-key.html)di *Referensi AWS CLI Perintah*. 

### `delete-authorizer`
<a name="api-gateway_DeleteAuthorizer_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk menghapus Authorizer Kustom di API**  
Perintah:  

```
aws apigateway delete-authorizer --rest-api-id 1234123412 --authorizer-id 7gkfbo
```
+  Untuk detail API, lihat [DeleteAuthorizer](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-authorizer.html)di *Referensi AWS CLI Perintah*. 

### `delete-base-path-mapping`
<a name="api-gateway_DeleteBasePathMapping_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-base-path-mapping`.

**AWS CLI**  
**Untuk menghapus pemetaan jalur dasar untuk nama domain kustom**  
Perintah:  

```
aws apigateway delete-base-path-mapping --domain-name 'api.domain.tld' --base-path 'dev'
```
+  Untuk detail API, lihat [DeleteBasePathMapping](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-base-path-mapping.html)di *Referensi AWS CLI Perintah*. 

### `delete-client-certificate`
<a name="api-gateway_DeleteClientCertificate_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-client-certificate`.

**AWS CLI**  
**Untuk menghapus sertifikat klien**  
Perintah:  

```
aws apigateway delete-client-certificate --client-certificate-id a1b2c3
```
+  Untuk detail API, lihat [DeleteClientCertificate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-client-certificate.html)di *Referensi AWS CLI Perintah*. 

### `delete-deployment`
<a name="api-gateway_DeleteDeployment_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk menghapus penerapan di API**  
Perintah:  

```
aws apigateway delete-deployment --rest-api-id 1234123412 --deployment-id a1b2c3
```
+  Untuk detail API, lihat [DeleteDeployment](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-deployment.html)di *Referensi AWS CLI Perintah*. 

### `delete-domain-name-access-association`
<a name="api-gateway_DeleteDomainNameAccessAssociation_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-domain-name-access-association`.

**AWS CLI**  
**Untuk menghapus asosiasi akses nama domain**  
`delete-domain-name-access-association`Contoh berikut menghapus asosiasi akses nama domain antara nama domain kustom pribadi dan titik akhir VPC.  

```
aws apigateway delete-domain-name-access-association \
    --domain-name-access-association-arn arn:aws:apigateway:us-west-2:012345678910:/domainnameaccessassociations/domainname/my.private.domain.tld/vpcesource/vpce-abcd1234efg
```
Perintah ini tidak menghasilkan output.  
Untuk informasi selengkapnya, lihat [Nama domain khusus untuk pribadi APIs di API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-custom-domains.html) di *Panduan Pengembang Amazon API Gateway*.  
+  Untuk detail API, lihat [DeleteDomainNameAccessAssociation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-domain-name-access-association.html)di *Referensi AWS CLI Perintah*. 

### `delete-domain-name`
<a name="api-gateway_DeleteDomainName_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-domain-name`.

**AWS CLI**  
**Untuk menghapus nama domain kustom**  
Perintah:  

```
aws apigateway delete-domain-name --domain-name 'api.domain.tld'
```
+  Untuk detail API, lihat [DeleteDomainName](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-domain-name.html)di *Referensi AWS CLI Perintah*. 

### `delete-integration-response`
<a name="api-gateway_DeleteIntegrationResponse_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-integration-response`.

**AWS CLI**  
**Untuk menghapus respons integrasi untuk sumber daya, metode, dan kode status tertentu dalam API**  
Perintah:  

```
aws apigateway delete-integration-response --rest-api-id 1234123412 --resource-id a1b2c3 --http-method GET --status-code 200
```
+  Untuk detail API, lihat [DeleteIntegrationResponse](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-integration-response.html)di *Referensi AWS CLI Perintah*. 

### `delete-integration`
<a name="api-gateway_DeleteIntegration_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk menghapus integrasi untuk sumber daya dan metode tertentu dalam API**  
Perintah:  

```
aws apigateway delete-integration --rest-api-id 1234123412 --resource-id a1b2c3 --http-method GET
```
+  Untuk detail API, lihat [DeleteIntegration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-integration.html)di *Referensi AWS CLI Perintah*. 

### `delete-method-response`
<a name="api-gateway_DeleteMethodResponse_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-method-response`.

**AWS CLI**  
**Untuk menghapus respons metode untuk sumber daya, metode, dan kode status yang diberikan dalam API**  
Perintah:  

```
aws apigateway delete-method-response --rest-api-id 1234123412 --resource-id a1b2c3 --http-method GET --status-code 200
```
+  Untuk detail API, lihat [DeleteMethodResponse](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-method-response.html)di *Referensi AWS CLI Perintah*. 

### `delete-method`
<a name="api-gateway_DeleteMethod_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk menghapus metode untuk sumber daya yang diberikan dalam API**  
Perintah:  

```
aws apigateway delete-method --rest-api-id 1234123412 --resource-id a1b2c3 --http-method GET
```
+  Untuk detail API, lihat [DeleteMethod](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-method.html)di *Referensi AWS CLI Perintah*. 

### `delete-model`
<a name="api-gateway_DeleteModel_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk menghapus model di API yang diberikan**  
Perintah:  

```
aws apigateway delete-model --rest-api-id 1234123412 --model-name 'customModel'
```
+  Untuk detail API, lihat [DeleteModel](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-model.html)di *Referensi AWS CLI Perintah*. 

### `delete-resource`
<a name="api-gateway_DeleteResource_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk menghapus sumber daya di API**  
Perintah:  

```
aws apigateway delete-resource --rest-api-id 1234123412 --resource-id a1b2c3
```
+  Untuk detail API, lihat [DeleteResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-resource.html)di *Referensi AWS CLI Perintah*. 

### `delete-rest-api`
<a name="api-gateway_DeleteRestApi_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-rest-api`.

**AWS CLI**  
**Untuk menghapus API**  
Perintah:  

```
aws apigateway delete-rest-api --rest-api-id 1234123412
```
+  Untuk detail API, lihat [DeleteRestApi](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-rest-api.html)di *Referensi AWS CLI Perintah*. 

### `delete-stage`
<a name="api-gateway_DeleteStage_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk menghapus tahapan di API**  
Perintah:  

```
aws apigateway delete-stage --rest-api-id 1234123412 --stage-name 'dev'
```
+  Untuk detail API, lihat [DeleteStage](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-stage.html)di *Referensi AWS CLI Perintah*. 

### `delete-usage-plan-key`
<a name="api-gateway_DeleteUsagePlanKey_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-usage-plan-key`.

**AWS CLI**  
**Untuk menghapus kunci API dari Paket Penggunaan**  
Perintah:  

```
aws apigateway delete-usage-plan-key --usage-plan-id a1b2c3 --key-id 1NbjQzMReAkeEQPNAW8r3dXsU2rDD7fc7f2Sipnu
```
+  Untuk detail API, lihat [DeleteUsagePlanKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-usage-plan-key.html)di *Referensi AWS CLI Perintah*. 

### `delete-usage-plan`
<a name="api-gateway_DeleteUsagePlan_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-usage-plan`.

**AWS CLI**  
**Untuk menghapus Paket Penggunaan**  
Perintah:  

```
aws apigateway delete-usage-plan --usage-plan-id a1b2c3
```
+  Untuk detail API, lihat [DeleteUsagePlan](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-usage-plan.html)di *Referensi AWS CLI Perintah*. 

### `flush-stage-authorizers-cache`
<a name="api-gateway_FlushStageAuthorizersCache_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`flush-stage-authorizers-cache`.

**AWS CLI**  
**Untuk membersihkan semua entri cache otorisasi di atas panggung**  
Perintah:  

```
aws apigateway flush-stage-authorizers-cache --rest-api-id 1234123412 --stage-name dev
```
+  Untuk detail API, lihat [FlushStageAuthorizersCache](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/flush-stage-authorizers-cache.html)di *Referensi AWS CLI Perintah*. 

### `flush-stage-cache`
<a name="api-gateway_FlushStageCache_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`flush-stage-cache`.

**AWS CLI**  
**Untuk membersihkan cache untuk tahap API**  
`flush-stage-cache`Contoh berikut membersihkan cache dari suatu tahap.  

```
aws apigateway flush-stage-cache \
    --rest-api-id 1234123412 \
    --stage-name dev
```
Perintah ini tidak menghasilkan output.  
Untuk informasi selengkapnya, lihat [Menyiram cache tahap API di API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html#flush-api-caching) di *Panduan Pengembang Amazon API Gateway*.  
+  Untuk detail API, lihat [FlushStageCache](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/flush-stage-cache.html)di *Referensi AWS CLI Perintah*. 

### `generate-client-certificate`
<a name="api-gateway_GenerateClientCertificate_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`generate-client-certificate`.

**AWS CLI**  
**Untuk membuat Sertifikat SSL Sisi Klien**  
Perintah:  

```
aws apigateway generate-client-certificate --description 'My First Client Certificate'
```
+  Untuk detail API, lihat [GenerateClientCertificate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/generate-client-certificate.html)di *Referensi AWS CLI Perintah*. 

### `get-account`
<a name="api-gateway_GetAccount_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-account`.

**AWS CLI**  
**Untuk mendapatkan pengaturan akun API Gateway**  
Perintah:  

```
aws apigateway get-account
```
Output:  

```
{
    "cloudwatchRoleArn": "arn:aws:iam::123412341234:role/APIGatewayToCloudWatchLogsRole",
    "throttleSettings": {
        "rateLimit": 500.0,
        "burstLimit": 1000
    }
}
```
+  Untuk detail API, lihat [GetAccount](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-account.html)di *Referensi AWS CLI Perintah*. 

### `get-api-key`
<a name="api-gateway_GetApiKey_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-api-key`.

**AWS CLI**  
**Untuk mendapatkan informasi tentang kunci API tertentu**  
Perintah:  

```
aws apigateway get-api-key --api-key 8bklk8bl1k3sB38D9B3l0enyWT8c09B30lkq0blk
```
Output:  

```
{
    "description": "My first key",
    "enabled": true,
    "stageKeys": [
        "a1b2c3d4e5/dev",
        "e5d4c3b2a1/dev"
    ],
    "lastUpdatedDate": 1456184515,
    "createdDate": 1456184452,
    "id": "8bklk8bl1k3sB38D9B3l0enyWT8c09B30lkq0blk",
    "name": "My key"
}
```
+  Untuk detail API, lihat [GetApiKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-api-key.html)di *Referensi AWS CLI Perintah*. 

### `get-api-keys`
<a name="api-gateway_GetApiKeys_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-api-keys`.

**AWS CLI**  
**Untuk mendapatkan daftar kunci API**  
Perintah:  

```
aws apigateway get-api-keys
```
Output:  

```
{
    "items": [
        {
            "description": "My first key",
            "enabled": true,
            "stageKeys": [
                "a1b2c3d4e5/dev",
                "e5d4c3b2a1/dev"
            ],
            "lastUpdatedDate": 1456184515,
            "createdDate": 1456184452,
            "id": "8bklk8bl1k3sB38D9B3l0enyWT8c09B30lkq0blk",
            "name": "My key"
        }
    ]
}
```
+  Untuk detail API, lihat [GetApiKeys](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-api-keys.html)di *Referensi AWS CLI Perintah*. 

### `get-authorizer`
<a name="api-gateway_GetAuthorizer_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-authorizer`.

**AWS CLI**  
**Untuk mendapatkan pengaturan API Gateway per-API Authorizer**  
Perintah:  

```
aws apigateway get-authorizer --rest-api-id 1234123412 --authorizer-id gfi4n3
```
Output:  

```
{
    "authorizerResultTtlInSeconds": 300,
    "name": "MyAuthorizer",
    "type": "TOKEN",
    "identitySource": "method.request.header.Authorization",
    "authorizerUri": "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:123412341234:function:authorizer_function/invocations",
    "id": "gfi4n3"
}
```
+  Untuk detail API, lihat [GetAuthorizer](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-authorizer.html)di *Referensi AWS CLI Perintah*. 

### `get-authorizers`
<a name="api-gateway_GetAuthorizers_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-authorizers`.

**AWS CLI**  
**Untuk mendapatkan daftar otorisasi untuk REST API**  
Perintah:  

```
aws apigateway get-authorizers --rest-api-id 1234123412
```
Output:  

```
{
    "items": [
        {
            "name": "MyAuthorizer",
            "authorizerUri": "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:123412341234:function:My_Authorizer_Function/invocations",
            "authorizerResultTtlInSeconds": 300,
            "identitySource": "method.request.header.Authorization",
            "type": "TOKEN",
            "id": "gfi4n3"
        }
    ]
}
```
+  Untuk detail API, lihat [GetAuthorizers](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-authorizers.html)di *Referensi AWS CLI Perintah*. 

### `get-base-path-mapping`
<a name="api-gateway_GetBasePathMapping_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-base-path-mapping`.

**AWS CLI**  
**Untuk mendapatkan pemetaan jalur dasar untuk nama domain khusus**  
Perintah:  

```
aws apigateway get-base-path-mapping --domain-name subdomain.domain.tld --base-path v1
```
Output:  

```
{
    "basePath": "v1",
    "restApiId": "1234w4321e",
    "stage": "api"
}
```
+  Untuk detail API, lihat [GetBasePathMapping](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-base-path-mapping.html)di *Referensi AWS CLI Perintah*. 

### `get-base-path-mappings`
<a name="api-gateway_GetBasePathMappings_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-base-path-mappings`.

**AWS CLI**  
**Untuk mendapatkan pemetaan jalur dasar untuk nama domain khusus**  
Perintah:  

```
aws apigateway get-base-path-mappings --domain-name subdomain.domain.tld
```
Output:  

```
{
    "items": [
        {
            "basePath": "(none)",
            "restApiId": "1234w4321e",
            "stage": "dev"
        },
        {
            "basePath": "v1",
            "restApiId": "1234w4321e",
            "stage": "api"
        }
    ]
}
```
+  Untuk detail API, lihat [GetBasePathMappings](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-base-path-mappings.html)di *Referensi AWS CLI Perintah*. 

### `get-client-certificate`
<a name="api-gateway_GetClientCertificate_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-client-certificate`.

**AWS CLI**  
**Untuk mendapatkan sertifikat klien**  
Perintah:  

```
aws apigateway get-client-certificate --client-certificate-id a1b2c3
```
+  Untuk detail API, lihat [GetClientCertificate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-client-certificate.html)di *Referensi AWS CLI Perintah*. 

### `get-client-certificates`
<a name="api-gateway_GetClientCertificates_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-client-certificates`.

**AWS CLI**  
**Untuk mendapatkan daftar sertifikat klien**  
Perintah:  

```
aws apigateway get-client-certificates
```
Output:  

```
{
    "items": [
        {
            "pemEncodedCertificate": "-----BEGIN CERTIFICATE----- <certificate content> -----END CERTIFICATE-----",
            "clientCertificateId": "a1b2c3",
            "expirationDate": 1483556561,
            "description": "My Client Certificate",
            "createdDate": 1452020561
        }
    ]
}
```
+  Untuk detail API, lihat [GetClientCertificates](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-client-certificates.html)di *Referensi AWS CLI Perintah*. 

### `get-deployment`
<a name="api-gateway_GetDeployment_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk mendapatkan informasi tentang penerapan**  
Perintah:  

```
aws apigateway get-deployment --rest-api-id 1234123412 --deployment-id ztt4m2
```
Output:  

```
{
    "description": "myDeployment",
    "id": "ztt4m2",
    "createdDate": 1455218022
}
```
+  Untuk detail API, lihat [GetDeployment](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-deployment.html)di *Referensi AWS CLI Perintah*. 

### `get-deployments`
<a name="api-gateway_GetDeployments_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-deployments`.

**AWS CLI**  
**Untuk mendapatkan daftar penerapan untuk REST API**  
Perintah:  

```
aws apigateway get-deployments --rest-api-id 1234123412
```
Output:  

```
{
    "items": [
        {
            "createdDate": 1453797217,
            "id": "0a2b4c",
            "description": "Deployed my API for the first time"
        }
    ]
}
```
+  Untuk detail API, lihat [GetDeployments](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-deployments.html)di *Referensi AWS CLI Perintah*. 

### `get-domain-name-access-associations`
<a name="api-gateway_GetDomainNameAccessAssociations_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-domain-name-access-associations`.

**AWS CLI**  
**Contoh 1: Untuk mencantumkan semua asosiasi akses nama domain**  
`get-domain-name-access-associations`Contoh berikut mencantumkan semua asosiasi akses nama domain.  

```
aws apigateway get-domain-name-access-associations
```
Output:  

```
{
    "items": [
        {
        "domainNameAccessAssociationArn": "arn:aws:apigateway:us-west-2:012345678910:/domainnameaccessassociations/domainname/my.private.domain.tld/vpcesource/vpce-abcd1234efg
        "accessAssociationSource": "vpce-abcd1234efg",
        "accessAssociationSourceType": "VPCE",
        "domainNameArn" : "arn:aws:apigateway:us-west-2:111122223333:/domainnames/private.example.com+abcd1234"
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Nama domain khusus untuk pribadi APIs di API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-custom-domains.html) di *Panduan Pengembang Amazon API Gateway*.  
**Contoh 2: Untuk mencantumkan semua asosiasi akses nama domain yang dimiliki oleh AWS akun ini**  
`get-domain-name-access-associations`Contoh berikut mencantumkan semua asosiasi akses nama domain yang dimiliki oleh AWS akun saat ini.  

```
aws apigateway get-domain-name-access-associations \
    --resource-owner SELF
```
Output:  

```
{
    "items": [
        {
        "domainNameAccessAssociationArn": "arn:aws:apigateway:us-west-2:012345678910:/domainnameaccessassociations/domainname/my.private.domain.tld/vpcesource/vpce-abcd1234efg
        "accessAssociationSource": "vpce-abcd1234efg",
        "accessAssociationSourceType": "VPCE",
        "domainNameArn" : "arn:aws:apigateway:us-west-2:111122223333:/domainnames/private.example.com+abcd1234"
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Nama domain khusus untuk pribadi APIs di API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-custom-domains.html) di *Panduan Pengembang Amazon API Gateway*.  
+  Untuk detail API, lihat [GetDomainNameAccessAssociations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-domain-name-access-associations.html)di *Referensi AWS CLI Perintah*. 

### `get-domain-name`
<a name="api-gateway_GetDomainName_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-domain-name`.

**AWS CLI**  
**Contoh 1: Untuk mendapatkan informasi tentang nama domain kustom publik**  
`get-domain-name`Contoh berikut mendapatkan informasi tentang nama domain kustom publik.  

```
aws apigateway get-domain-name \
    --domain-name api.domain.tld
```
Output:  

```
{
    "domainName": "api.domain.tld",
    "distributionDomainName": "d1a2f3a4c5o6d.cloudfront.net",
    "certificateName": "uploadedCertificate",
    "certificateUploadDate": 1462565487
}
```
Untuk informasi selengkapnya, lihat [Nama domain khusus untuk REST publik APIs di API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) di *Panduan Pengembang Amazon API Gateway*.  
**Contoh 2: Untuk mendapatkan informasi tentang nama domain kustom pribadi**  
`get-domain-name`Contoh berikut mendapatkan informasi tentang nama domain kustom pribadi.  

```
aws apigateway get-domain-name \
    --domain-name api.private.domain.tld \
    --domain-name-id abcd1234
```
Output:  

```
{
    "domainName": "my.private.domain.tld",
    "domainNameId": "abcd1234",
    "domainNameArn": "arn:aws:apigateway:us-east-1:012345678910:/domainnames/my.private.domain.tld+abcd1234",
    "certificateArn": "arn:aws:acm:us-east-1:012345678910:certificate/fb1b9770-a305-495d-aefb-27e5e101ff3",
    "certificateUploadDate": "2024-09-10T10:31:20-07:00",
    "endpointConfiguration": {
        "types": [
            "PRIVATE"
        ]
    },
    "domainNameStatus": "AVAILABLE",
    "securityPolicy": "TLS_1_2",
    "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"execute-api:Invoke\",\"Resource\":\"arn:aws:execute-api:us-east-1:012345678910:/domainnames/my.private.domain.tld+abcd1234\"},{\"Effect\":\"Deny\",\"Principal\":\"*\",\"Action\":\"execute-api:Invoke\",\"Resource\":\"arn:aws:execute-api:us-east-1:012345678910:/domainnames/my.private.domain.tld+abcd1234\",\"Condition\":{\"StringNotEquals\":{\"aws:SourceVpc\":\"vpc-1a2b3c4d\"}}}]}"
}
```
Untuk informasi selengkapnya, lihat [Nama domain khusus untuk REST publik APIs di API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) di *Panduan Pengembang Amazon API Gateway*.  
+  Untuk detail API, lihat [GetDomainName](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-domain-name.html)di *Referensi AWS CLI Perintah*. 

### `get-domain-names`
<a name="api-gateway_GetDomainNames_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-domain-names`.

**AWS CLI**  
**Contoh 1: Untuk mendapatkan daftar nama domain khusus**  
`get-domain-names`Perintah berikut mendapat daftar nama domain.  

```
aws apigateway get-domain-names
```
Output:  

```
{
    "items": [
        {
            "distributionDomainName": "d9511k3l09bkd.cloudfront.net",
            "certificateUploadDate": 1452812505,
            "certificateName": "my_custom_domain-certificate",
            "domainName": "subdomain.domain.tld"
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Nama domain khusus untuk pribadi APIs di API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-custom-domains.html) di *Panduan Pengembang Amazon API Gateway*.  
**Contoh 2: Untuk mendapatkan daftar nama domain khusus yang dimiliki oleh AWS akun ini**  
`get-domain-names`Perintah berikut mendapatkan daftar nama domain yang dimiliki oleh AWS akun ini.  

```
aws apigateway get-domain-names \
    --resource-owner SELF
```
Output:  

```
{
    "items": [
        {
            "domainName": "my.domain.tld",
            "domainNameArn": "arn:aws:apigateway:us-east-1::/domainnames/my.private.domain.tld",
            "certificateUploadDate": "2024-08-15T17:02:55-07:00",
            "regionalDomainName": "d-abcd1234.execute-api.us-east-1.amazonaws.com",
            "regionalHostedZoneId": "Z1UJRXOUMOOFQ8",
            "regionalCertificateArn": "arn:aws:acm:us-east-1:012345678910:certificate/fb1b9770-a305-495d-aefb-27e5e101ff3",
            "endpointConfiguration": {
                "types": [
                    "REGIONAL"
                ]
            },
            "domainNameStatus": "AVAILABLE",
            "securityPolicy": "TLS_1_2"
        },
        {
            "domainName": "my.private.domain.tld",
            "domainNameId": "abcd1234",
            "domainNameArn": "arn:aws:apigateway:us-east-1:012345678910:/domainnames/my.private.domain.tld+abcd1234",
            "certificateArn": "arn:aws:acm:us-east-1:012345678910:certificate/fb1b9770-a305-495d-aefb-27e5e101ff3",
            "certificateUploadDate": "2024-11-26T11:44:40-08:00",
            "endpointConfiguration": {
                "types": [
                    "PRIVATE"
                ]
            },
            "domainNameStatus": "AVAILABLE",
            "securityPolicy": "TLS_1_2"
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Nama domain khusus untuk pribadi APIs di API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-custom-domains.html) di *Panduan Pengembang Amazon API Gateway*.  
**Contoh 3: Untuk mendapatkan daftar nama domain khusus yang dimiliki oleh AWS akun lain yang dapat Anda buat asosiasi akses nama domain.**  
`get-domain-names`Perintah berikut mendapatkan daftar nama domain yang dimiliki oleh AWS akun lain yang Anda memiliki akses untuk membuat asosiasi akses nama domain dengan.  

```
aws apigateway get-domain-names \
    --resource-owner OTHER_ACCOUNTS
```
Output:  

```
{
    "items": [
        {
            "domainName": "my.private.domain.tld",
            "domainNameId": "abcd1234",
            "domainNameArn": "arn:aws:apigateway:us-east-1:012345678910:/domainnames/my.private.domain.tld+abcd1234"
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Nama domain khusus untuk pribadi APIs di API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-custom-domains.html) di *Panduan Pengembang Amazon API Gateway*.  
+  Untuk detail API, lihat [GetDomainNames](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-domain-names.html)di *Referensi AWS CLI Perintah*. 

### `get-export`
<a name="api-gateway_GetExport_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-export`.

**AWS CLI**  
**Untuk mendapatkan template JSON Swagger untuk sebuah panggung**  
Perintah:  

```
aws apigateway get-export --rest-api-id a1b2c3d4e5 --stage-name dev --export-type swagger /path/to/filename.json
```
**Untuk mendapatkan template JSON Swagger\$1API Gateway Extensions untuk sebuah panggung**  
Perintah:  

```
aws apigateway get-export --parameters extensions='integrations' --rest-api-id a1b2c3d4e5 --stage-name dev --export-type swagger /path/to/filename.json
```
**Untuk mendapatkan template JSON Swagger\$1Ekstensi Postman untuk sebuah panggung**  
Perintah:  

```
aws apigateway get-export --parameters extensions='postman' --rest-api-id a1b2c3d4e5 --stage-name dev --export-type swagger /path/to/filename.json
```
+  Untuk detail API, lihat [GetExport](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-export.html)di *Referensi AWS CLI Perintah*. 

### `get-integration-response`
<a name="api-gateway_GetIntegrationResponse_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-integration-response`.

**AWS CLI**  
**Untuk mendapatkan konfigurasi respons integrasi untuk metode HTTP yang ditentukan di bawah sumber daya REST API**  
Perintah:  

```
aws apigateway get-integration-response --rest-api-id 1234123412 --resource-id y9h6rt --http-method GET --status-code 200
```
Output:  

```
{
    "statusCode": "200",
    "responseTemplates": {
        "application/json": null
    }
}
```
+  Untuk detail API, lihat [GetIntegrationResponse](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-integration-response.html)di *Referensi AWS CLI Perintah*. 

### `get-integration`
<a name="api-gateway_GetIntegration_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-integration`.

**AWS CLI**  
**Untuk mendapatkan konfigurasi integrasi untuk metode HTTP yang didefinisikan di bawah sumber daya REST API**  
Perintah:  

```
aws apigateway get-integration --rest-api-id 1234123412 --resource-id y9h6rt --http-method GET
```
Output:  

```
{
    "httpMethod": "POST",
    "integrationResponses": {
        "200": {
            "responseTemplates": {
                "application/json": null
            },
            "statusCode": "200"
        }
    },
    "cacheKeyParameters": [],
    "type": "AWS",
    "uri": "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:123412341234:function:My_Function/invocations",
    "cacheNamespace": "y9h6rt"
}
```
+  Untuk detail API, lihat [GetIntegration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-integration.html)di *Referensi AWS CLI Perintah*. 

### `get-method-response`
<a name="api-gateway_GetMethodResponse_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-method-response`.

**AWS CLI**  
**Untuk mendapatkan konfigurasi sumber daya respons metode untuk metode HTTP yang didefinisikan di bawah sumber daya REST API**  
Perintah:  

```
aws apigateway get-method-response --rest-api-id 1234123412 --resource-id y9h6rt --http-method GET --status-code 200
```
Output:  

```
{
    "responseModels": {
        "application/json": "Empty"
    },
    "statusCode": "200"
}
```
+  Untuk detail API, lihat [GetMethodResponse](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-method-response.html)di *Referensi AWS CLI Perintah*. 

### `get-method`
<a name="api-gateway_GetMethod_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-method`.

**AWS CLI**  
**Untuk mendapatkan konfigurasi sumber daya metode untuk metode HTTP yang didefinisikan di bawah sumber daya REST API**  
Perintah:  

```
aws apigateway get-method --rest-api-id 1234123412 --resource-id y9h6rt --http-method GET
```
Output:  

```
{
    "apiKeyRequired": false,
    "httpMethod": "GET",
    "methodIntegration": {
        "integrationResponses": {
            "200": {
                "responseTemplates": {
                    "application/json": null
                },
                "statusCode": "200"
            }
        },
        "cacheKeyParameters": [],
        "uri": "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:123412341234:function:My_Function/invocations",
        "httpMethod": "POST",
        "cacheNamespace": "y9h6rt",
        "type": "AWS"
    },
    "requestParameters": {},
    "methodResponses": {
        "200": {
            "responseModels": {
                "application/json": "Empty"
            },
            "statusCode": "200"
        }
    },
    "authorizationType": "NONE"
}
```
+  Untuk detail API, lihat [GetMethod](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-method.html)di *Referensi AWS CLI Perintah*. 

### `get-model-template`
<a name="api-gateway_GetModelTemplate_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-model-template`.

**AWS CLI**  
**Untuk mendapatkan template pemetaan untuk model yang ditentukan di bawah REST API**  
Perintah:  

```
aws apigateway get-model-template --rest-api-id 1234123412 --model-name Empty
```
Output:  

```
{
    "value": "#set($inputRoot = $input.path('$'))\n{ }"
}
```
+  Untuk detail API, lihat [GetModelTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-model-template.html)di *Referensi AWS CLI Perintah*. 

### `get-model`
<a name="api-gateway_GetModel_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-model`.

**AWS CLI**  
**Untuk mendapatkan konfigurasi untuk model yang ditentukan di bawah REST API**  
Perintah:  

```
aws apigateway get-model --rest-api-id 1234123412 --model-name Empty
```
Output:  

```
{
    "contentType": "application/json",
    "description": "This is a default empty schema model",
    "name": "Empty",
    "id": "etd5w5",
    "schema": "{\n  \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n  \"title\" : \"Empty Schema\",\n  \"type\" : \"object\"\n}"
}
```
+  Untuk detail API, lihat [GetModel](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-model.html)di *Referensi AWS CLI Perintah*. 

### `get-models`
<a name="api-gateway_GetModels_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-models`.

**AWS CLI**  
**Untuk mendapatkan daftar model untuk REST API**  
Perintah:  

```
aws apigateway get-models --rest-api-id 1234123412
```
Output:  

```
{
    "items": [
        {
            "description": "This is a default error schema model",
            "schema": "{\n  \"$schema\" : \"http://json-schema.org/draft-04/schema#\",\n  \"title\" : \"Error Schema\",\n  \"type\" : \"object\",\n  \"properties\" : {\n    \"message\" : { \"type\" : \"string\" }\n  }\n}",
            "contentType": "application/json",
            "id": "7tpbze",
            "name": "Error"
        },
        {
            "description": "This is a default empty schema model",
            "schema": "{\n  \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n  \"title\" : \"Empty Schema\",\n  \"type\" : \"object\"\n}",
            "contentType": "application/json",
            "id": "etd5w5",
            "name": "Empty"
        }
    ]
}
```
+  Untuk detail API, lihat [GetModels](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-models.html)di *Referensi AWS CLI Perintah*. 

### `get-resource`
<a name="api-gateway_GetResource_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk mendapatkan informasi tentang sumber daya**  
Perintah:  

```
aws apigateway get-resource --rest-api-id 1234123412 --resource-id zwo0y3
```
Output:  

```
{
    "path": "/path",
    "pathPart": "path",
    "id": "zwo0y3",
    "parentId": "uyokt6ij2g"
}
```
+  Untuk detail API, lihat [GetResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-resource.html)di *Referensi AWS CLI Perintah*. 

### `get-resources`
<a name="api-gateway_GetResources_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-resources`.

**AWS CLI**  
**Untuk mendapatkan daftar sumber daya untuk REST API**  
Perintah:  

```
aws apigateway get-resources --rest-api-id 1234123412
```
Output:  

```
{
    "items": [
        {
            "path": "/resource/subresource",
            "resourceMethods": {
                "POST": {}
            },
            "id": "024ace",
            "pathPart": "subresource",
            "parentId": "ai5b02"
        }
    ]
}
```
+  Untuk detail API, lihat [GetResources](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-resources.html)di *Referensi AWS CLI Perintah*. 

### `get-rest-api`
<a name="api-gateway_GetRestApi_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-rest-api`.

**AWS CLI**  
**Untuk mendapatkan informasi tentang API**  
Perintah:  

```
aws apigateway get-rest-api --rest-api-id 1234123412
```
Output:  

```
{
    "name": "myAPI",
    "id": "o1y243m4f5",
    "createdDate": 1453416433
}
```
+  Untuk detail API, lihat [GetRestApi](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-rest-api.html)di *Referensi AWS CLI Perintah*. 

### `get-rest-apis`
<a name="api-gateway_GetRestApis_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-rest-apis`.

**AWS CLI**  
**Untuk mendapatkan daftar REST APIs**  
Perintah:  

```
aws apigateway get-rest-apis
```
Output:  

```
{
    "items": [
        {
            "createdDate": 1438884790,
            "id": "12s44z21rb",
            "name": "My First API"
        }
    ]
}
```
+  Untuk detail API, lihat [GetRestApis](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-rest-apis.html)di *Referensi AWS CLI Perintah*. 

### `get-sdk`
<a name="api-gateway_GetSdk_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-sdk`.

**AWS CLI**  
**Untuk mendapatkan Android SDK untuk tahap REST API**  
Perintah:  

```
aws apigateway get-sdk --rest-api-id 1234123412 --stage-name dev --sdk-type android --parameters groupId='com.mycompany',invokerPackage='com.mycompany.clientsdk',artifactId='Mycompany-client',artifactVersion='1.0.0' /path/to/android_sdk.zip
```
Output:  

```
{
    "contentType": "application/octet-stream",
    "contentDisposition": "attachment; filename=\"android_2016-02-22_23-52Z.zip\""
}
```
**Untuk mendapatkan SDK IOS untuk tahap REST API**  
Perintah:  

```
aws apigateway get-sdk --rest-api-id 1234123412 --stage-name dev --sdk-type objectivec --parameters classPrefix='myprefix' /path/to/iOS_sdk.zip
```
Output:  

```
{
    "contentType": "application/octet-stream",
    "contentDisposition": "attachment; filename=\"objectivec_2016-02-22_23-52Z.zip\""
}
```
**Untuk mendapatkan Javascript SDK untuk tahap REST API**  
Perintah:  

```
aws apigateway get-sdk --rest-api-id 1234123412 --stage-name dev --sdk-type javascript /path/to/javascript_sdk.zip
```
Output:  

```
{
    "contentType": "application/octet-stream",
    "contentDisposition": "attachment; filename=\"javascript_2016-02-22_23-52Z.zip\""
}
```
+  Untuk detail API, lihat [GetSdk](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-sdk.html)di *Referensi AWS CLI Perintah*. 

### `get-stage`
<a name="api-gateway_GetStage_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-stage`.

**AWS CLI**  
**Untuk mendapatkan informasi tentang tahap API**  
Perintah:  

```
aws apigateway get-stage --rest-api-id 1234123412 --stage-name dev
```
Output:  

```
{
    "stageName": "dev",
    "cacheClusterSize": "0.5",
    "cacheClusterEnabled": false,
    "cacheClusterStatus": "NOT_AVAILABLE",
    "deploymentId": "rbh1fj",
    "lastUpdatedDate": 1466802961,
    "createdDate": 1460682074,
    "methodSettings": {
        "*/*": {
            "cacheTtlInSeconds": 300,
            "loggingLevel": "INFO",
            "dataTraceEnabled": false,
            "metricsEnabled": true,
            "unauthorizedCacheControlHeaderStrategy": "SUCCEED_WITH_RESPONSE_HEADER",
            "throttlingRateLimit": 500.0,
            "cacheDataEncrypted": false,
            "cachingEnabled": false,
            "throttlingBurstLimit": 1000,
            "requireAuthorizationForCacheControl": true
        },
        "~1resource/GET": {
            "cacheTtlInSeconds": 300,
            "loggingLevel": "INFO",
            "dataTraceEnabled": false,
            "metricsEnabled": true,
            "unauthorizedCacheControlHeaderStrategy": "SUCCEED_WITH_RESPONSE_HEADER",
            "throttlingRateLimit": 500.0,
            "cacheDataEncrypted": false,
            "cachingEnabled": false,
            "throttlingBurstLimit": 1000,
            "requireAuthorizationForCacheControl": true
        }
    }
}
```
+  Untuk detail API, lihat [GetStage](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-stage.html)di *Referensi AWS CLI Perintah*. 

### `get-stages`
<a name="api-gateway_GetStages_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-stages`.

**AWS CLI**  
**Untuk mendapatkan daftar tahapan untuk REST API**  
Perintah:  

```
aws apigateway get-stages --rest-api-id 1234123412
```
Output:  

```
{
    "item": [
        {
            "stageName": "dev",
            "cacheClusterSize": "0.5",
            "cacheClusterEnabled": true,
            "cacheClusterStatus": "AVAILABLE",
            "deploymentId": "123h64",
            "lastUpdatedDate": 1456185138,
            "createdDate": 1453589092,
            "methodSettings": {
                "~1resource~1subresource/POST": {
                    "cacheTtlInSeconds": 300,
                    "loggingLevel": "INFO",
                    "dataTraceEnabled": true,
                    "metricsEnabled": true,
                    "throttlingRateLimit": 500.0,
                    "cacheDataEncrypted": false,
                    "cachingEnabled": false,
                    "throttlingBurstLimit": 1000
                }
            }
        }
    ]
}
```
+  Untuk detail API, lihat [GetStages](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-stages.html)di *Referensi AWS CLI Perintah*. 

### `get-usage-plan-key`
<a name="api-gateway_GetUsagePlanKey_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-usage-plan-key`.

**AWS CLI**  
**Untuk mendapatkan detail kunci API yang terkait dengan Paket Penggunaan**  
Perintah:  

```
aws apigateway get-usage-plan-key --usage-plan-id a1b2c3 --key-id 1NbjQzMReAkeEQPNAW8r3dXsU2rDD7fc7f2Sipnu
```
+  Untuk detail API, lihat [GetUsagePlanKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-usage-plan-key.html)di *Referensi AWS CLI Perintah*. 

### `get-usage-plan-keys`
<a name="api-gateway_GetUsagePlanKeys_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-usage-plan-keys`.

**AWS CLI**  
**Untuk mendapatkan daftar kunci API yang terkait dengan Paket Penggunaan**  
Perintah:  

```
aws apigateway get-usage-plan-keys --usage-plan-id a1b2c3
```
+  Untuk detail API, lihat [GetUsagePlanKeys](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-usage-plan-keys.html)di *Referensi AWS CLI Perintah*. 

### `get-usage-plan`
<a name="api-gateway_GetUsagePlan_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-usage-plan`.

**AWS CLI**  
**Untuk mendapatkan detail Paket Penggunaan**  
Perintah:  

```
aws apigateway get-usage-plan --usage-plan-id a1b2c3
```
+  Untuk detail API, lihat [GetUsagePlan](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-usage-plan.html)di *Referensi AWS CLI Perintah*. 

### `get-usage-plans`
<a name="api-gateway_GetUsagePlans_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-usage-plans`.

**AWS CLI**  
**Untuk mendapatkan detail dari semua Paket Penggunaan**  
Perintah:  

```
aws apigateway get-usage-plans
```
+  Untuk detail API, lihat [GetUsagePlans](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-usage-plans.html)di *Referensi AWS CLI Perintah*. 

### `get-usage`
<a name="api-gateway_GetUsage_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-usage`.

**AWS CLI**  
**Untuk mendapatkan detail penggunaan untuk Paket Penggunaan**  
Perintah:  

```
aws apigateway get-usage --usage-plan-id a1b2c3 --start-date "2016-08-16" --end-date "2016-08-17"
```
+  Untuk detail API, lihat [GetUsage](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-usage.html)di *Referensi AWS CLI Perintah*. 

### `import-rest-api`
<a name="api-gateway_ImportRestApi_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`import-rest-api`.

**AWS CLI**  
**Untuk mengimpor template Swagger dan membuat API**  
Perintah:  

```
aws apigateway import-rest-api --body 'file:///path/to/API_Swagger_template.json'
```
+  Untuk detail API, lihat [ImportRestApi](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/import-rest-api.html)di *Referensi AWS CLI Perintah*. 

### `put-integration-response`
<a name="api-gateway_PutIntegrationResponse_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`put-integration-response`.

**AWS CLI**  
**Untuk membuat respons integrasi sebagai respons default dengan template pemetaan yang ditentukan**  
Perintah:  

```
aws apigateway put-integration-response --rest-api-id 1234123412 --resource-id a1b2c3 --http-method GET --status-code 200 --selection-pattern "" --response-templates '{"application/json": "{\"json\": \"template\"}"}'
```
**Untuk membuat respons integrasi dengan regex 400 dan nilai header yang ditentukan secara statis**  
Perintah:  

```
aws apigateway put-integration-response --rest-api-id 1234123412 --resource-id a1b2c3 --http-method GET --status-code 400 --selection-pattern 400 --response-parameters '{"method.response.header.custom-header": "'"'"'custom-value'"'"'"}'
```
+  Untuk detail API, lihat [PutIntegrationResponse](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/put-integration-response.html)di *Referensi AWS CLI Perintah*. 

### `put-integration`
<a name="api-gateway_PutIntegration_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`put-integration`.

**AWS CLI**  
**Untuk membuat permintaan integrasi MOCK**  
Perintah:  

```
aws apigateway put-integration --rest-api-id 1234123412 --resource-id a1b2c3 --http-method GET --type MOCK --request-templates '{ "application/json": "{\"statusCode\": 200}" }'
```
**Untuk membuat permintaan integrasi HTTP**  
Perintah:  

```
aws apigateway put-integration --rest-api-id 1234123412 --resource-id a1b2c3 --http-method GET --type HTTP --integration-http-method GET --uri 'https://domain.tld/path'
```
**Untuk membuat permintaan AWS integrasi dengan titik akhir Fungsi Lambda**  
Perintah:  

```
aws apigateway put-integration --rest-api-id 1234123412 --resource-id a1b2c3 --http-method GET --type AWS --integration-http-method POST --uri 'arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:123412341234:function:function_name/invocations'
```
+  Untuk detail API, lihat [PutIntegration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/put-integration.html)di *Referensi AWS CLI Perintah*. 

### `put-method-response`
<a name="api-gateway_PutMethodResponse_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`put-method-response`.

**AWS CLI**  
**Untuk membuat respons metode di bawah kode status yang ditentukan dengan header respons metode kustom**  
Perintah:  

```
aws apigateway put-method-response --rest-api-id 1234123412 --resource-id a1b2c3 --http-method GET --status-code 400 --response-parameters "method.response.header.custom-header=false"
```
+  Untuk detail API, lihat [PutMethodResponse](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/put-method-response.html)di *Referensi AWS CLI Perintah*. 

### `put-method`
<a name="api-gateway_PutMethod_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`put-method`.

**AWS CLI**  
**Untuk membuat metode untuk sumber daya di API tanpa otorisasi, tanpa kunci API, dan header permintaan metode khusus**  
Perintah:  

```
aws apigateway put-method --rest-api-id 1234123412 --resource-id a1b2c3 --http-method PUT --authorization-type "NONE" --no-api-key-required --request-parameters "method.request.header.custom-header=false"
```
+  Untuk detail API, lihat [PutMethod](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/put-method.html)di *Referensi AWS CLI Perintah*. 

### `put-rest-api`
<a name="api-gateway_PutRestApi_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`put-rest-api`.

**AWS CLI**  
**Untuk menimpa API yang ada menggunakan template Swagger**  
Perintah:  

```
aws apigateway put-rest-api --rest-api-id 1234123412 --mode overwrite --body 'fileb:///path/to/API_Swagger_template.json'
```
**Untuk menggabungkan template Swagger ke dalam API yang ada**  
Perintah:  

```
aws apigateway put-rest-api --rest-api-id 1234123412 --mode merge --body 'fileb:///path/to/API_Swagger_template.json'
```
+  Untuk detail API, lihat [PutRestApi](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/put-rest-api.html)di *Referensi AWS CLI Perintah*. 

### `reject-domain-name-access-association`
<a name="api-gateway_RejectDomainNameAccessAssociation_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`reject-domain-name-access-association`.

**AWS CLI**  
**Untuk menolak asosiasi akses nama domain**  
`reject-domain-name-access-association`Contoh berikut menolak asosiasi akses nama domain antara nama domain kustom pribadi dan titik akhir VPC.  

```
aws apigateway reject-domain-name-access-association \
    --domain-name-access-association-arn arn:aws:apigateway:us-west-2:012345678910:/domainnameaccessassociations/domainname/my.private.domain.tld/vpcesource/vpce-abcd1234efg \
    --domain-name-arn arn:aws:apigateway:us-east-1:012345678910:/domainnames/my.private.domain.tld+abcd1234
```
Perintah ini tidak menghasilkan output.  
Untuk informasi selengkapnya, lihat [Nama domain khusus untuk pribadi APIs di API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-custom-domains.html) di *Panduan Pengembang Amazon API Gateway*.  
+  Untuk detail API, lihat [RejectDomainNameAccessAssociation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/reject-domain-name-access-association.html)di *Referensi AWS CLI Perintah*. 

### `test-invoke-authorizer`
<a name="api-gateway_TestInvokeAuthorizer_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`test-invoke-authorizer`.

**AWS CLI**  
**Untuk menguji, panggil permintaan ke Custom Authorizer termasuk header dan nilai yang diperlukan**  
Perintah:  

```
aws apigateway test-invoke-authorizer --rest-api-id 1234123412 --authorizer-id 5yid1t --headers Authorization='Value'
```
+  Untuk detail API, lihat [TestInvokeAuthorizer](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/test-invoke-authorizer.html)di *Referensi AWS CLI Perintah*. 

### `test-invoke-method`
<a name="api-gateway_TestInvokeMethod_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`test-invoke-method`.

**AWS CLI**  
**Untuk menguji, panggil sumber daya root di API dengan membuat permintaan GET**  
Perintah:  

```
aws apigateway test-invoke-method --rest-api-id 1234123412 --resource-id avl5sg8fw8 --http-method GET --path-with-query-string '/'
```
**Untuk menguji, panggil sub-sumber daya di API dengan membuat permintaan GET dengan nilai parameter jalur yang ditentukan**  
Perintah:  

```
aws apigateway test-invoke-method --rest-api-id 1234123412 --resource-id 3gapai --http-method GET --path-with-query-string '/pets/1'
```
+  Untuk detail API, lihat [TestInvokeMethod](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/test-invoke-method.html)di *Referensi AWS CLI Perintah*. 

### `update-account`
<a name="api-gateway_UpdateAccount_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk mengubah ARN Peran IAM untuk pencatatan ke Log CloudWatch **  
Perintah:  

```
aws apigateway update-account --patch-operations op='replace',path='/cloudwatchRoleArn',value='arn:aws:iam::123412341234:role/APIGatewayToCloudWatchLogs'
```
Output:  

```
{
    "cloudwatchRoleArn": "arn:aws:iam::123412341234:role/APIGatewayToCloudWatchLogs",
    "throttleSettings": {
        "rateLimit": 1000.0,
        "burstLimit": 2000
    }
}
```
+  Untuk detail API, lihat [UpdateAccount](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-account.html)di *Referensi AWS CLI Perintah*. 

### `update-api-key`
<a name="api-gateway_UpdateApiKey_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-api-key`.

**AWS CLI**  
**Untuk mengubah nama Kunci API**  
Perintah:  

```
aws apigateway update-api-key --api-key sNvjQDMReA1eEQPNAW8r37XsU2rDD7fc7m2SiMnu --patch-operations op='replace',path='/name',value='newName'
```
Output:  

```
{
    "description": "currentDescription",
    "enabled": true,
    "stageKeys": [
        "41t2j324r5/dev"
    ],
    "lastUpdatedDate": 1470086052,
    "createdDate": 1445460347,
    "id": "sNvjQDMReA1vEQPNzW8r3dXsU2rrD7fcjm2SiMnu",
    "name": "newName"
}
```
**Untuk menonaktifkan Kunci API**  
Perintah:  

```
aws apigateway update-api-key --api-key sNvjQDMReA1eEQPNAW8r37XsU2rDD7fc7m2SiMnu --patch-operations op='replace',path='/enabled',value='false'
```
Output:  

```
{
    "description": "currentDescription",
    "enabled": false,
    "stageKeys": [
        "41t2j324r5/dev"
    ],
    "lastUpdatedDate": 1470086052,
    "createdDate": 1445460347,
    "id": "sNvjQDMReA1vEQPNzW8r3dXsU2rrD7fcjm2SiMnu",
    "name": "newName"
}
```
+  Untuk detail API, lihat [UpdateApiKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-api-key.html)di *Referensi AWS CLI Perintah*. 

### `update-authorizer`
<a name="api-gateway_UpdateAuthorizer_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk mengubah nama Custom Authorizer**  
Perintah:  

```
aws apigateway update-authorizer --rest-api-id 1234123412 --authorizer-id gfi4n3 --patch-operations op='replace',path='/name',value='testAuthorizer'
```
Output:  

```
{
    "authType": "custom",
    "name": "testAuthorizer",
    "authorizerUri": "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:123412341234:function:customAuthorizer/invocations",
    "authorizerResultTtlInSeconds": 300,
    "identitySource": "method.request.header.Authorization",
    "type": "TOKEN",
    "id": "gfi4n3"
}
```
**Untuk mengubah Fungsi Lambda yang dipanggil oleh Custom Authorizer**  
Perintah:  

```
aws apigateway update-authorizer --rest-api-id 1234123412 --authorizer-id gfi4n3 --patch-operations op='replace',path='/authorizerUri',value='arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:123412341234:function:newAuthorizer/invocations'
```
Output:  

```
{
    "authType": "custom",
    "name": "testAuthorizer",
    "authorizerUri": "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:123412341234:function:newAuthorizer/invocations",
    "authorizerResultTtlInSeconds": 300,
    "identitySource": "method.request.header.Authorization",
    "type": "TOKEN",
    "id": "gfi4n3"
}
```
+  Untuk detail API, lihat [UpdateAuthorizer](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-authorizer.html)di *Referensi AWS CLI Perintah*. 

### `update-base-path-mapping`
<a name="api-gateway_UpdateBasePathMapping_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-base-path-mapping`.

**AWS CLI**  
**Untuk mengubah jalur dasar untuk nama domain kustom**  
Perintah:  

```
aws apigateway update-base-path-mapping --domain-name api.domain.tld --base-path prod --patch-operations op='replace',path='/basePath',value='v1'
```
Output:  

```
{
    "basePath": "v1",
    "restApiId": "1234123412",
    "stage": "api"
}
```
+  Untuk detail API, lihat [UpdateBasePathMapping](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-base-path-mapping.html)di *Referensi AWS CLI Perintah*. 

### `update-client-certificate`
<a name="api-gateway_UpdateClientCertificate_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-client-certificate`.

**AWS CLI**  
**Untuk memperbarui deskripsi sertifikat klien**  
Perintah:  

```
aws apigateway update-client-certificate --client-certificate-id a1b2c3 --patch-operations op='replace',path='/description',value='My new description'
```
+  Untuk detail API, lihat [UpdateClientCertificate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-client-certificate.html)di *Referensi AWS CLI Perintah*. 

### `update-deployment`
<a name="api-gateway_UpdateDeployment_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk mengubah deskripsi penerapan**  
Perintah:  

```
aws apigateway update-deployment --rest-api-id 1234123412 --deployment-id ztt4m2 --patch-operations op='replace',path='/description',value='newDescription'
```
Output:  

```
{
    "description": "newDescription",
    "id": "ztt4m2",
    "createdDate": 1455218022
}
```
+  Untuk detail API, lihat [UpdateDeployment](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-deployment.html)di *Referensi AWS CLI Perintah*. 

### `update-domain-name`
<a name="api-gateway_UpdateDomainName_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-domain-name`.

**AWS CLI**  
**Untuk mengubah nama sertifikat untuk nama domain kustom**  
`update-domain-name`Contoh berikut mengubah nama sertifikat untuk domain kustom.  

```
aws apigateway update-domain-name \
    --domain-name api.domain.tld \
    --patch-operations op='replace',path='/certificateArn',value='arn:aws:acm:us-west-2:111122223333:certificate/CERTEXAMPLE123EXAMPLE'
```
Output:  

```
{
    "domainName": "api.domain.tld",
    "distributionDomainName": "d123456789012.cloudfront.net",
    "certificateArn": "arn:aws:acm:us-west-2:111122223333:certificate/CERTEXAMPLE123EXAMPLE",
    "certificateUploadDate": 1462565487
}
```
Untuk informasi selengkapnya, lihat [Mengatur Nama Domain Kustom untuk API di API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) di *Panduan Pengembang Amazon API Gateway*.  
+  Untuk detail API, lihat [UpdateDomainName](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-domain-name.html)di *Referensi AWS CLI Perintah*. 

### `update-integration-response`
<a name="api-gateway_UpdateIntegrationResponse_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-integration-response`.

**AWS CLI**  
**Untuk mengubah header respons integrasi untuk memiliki pemetaan statis '\$1'**  
Perintah:  

```
aws apigateway update-integration-response --rest-api-id 1234123412 --resource-id 3gapai --http-method GET --status-code 200 --patch-operations op='replace',path='/responseParameters/method.response.header.Access-Control-Allow-Origin',value='"'"'*'"'"'
```
Output:  

```
{
    "statusCode": "200",
    "responseParameters": {
        "method.response.header.Access-Control-Allow-Origin": "'*'"
    }
}
```
**Untuk menghapus header respons integrasi**  
Perintah:  

```
aws apigateway update-integration-response --rest-api-id 1234123412 --resource-id 3gapai --http-method GET --status-code 200 --patch-operations op='remove',path='/responseParameters/method.response.header.Access-Control-Allow-Origin'
```
+  Untuk detail API, lihat [UpdateIntegrationResponse](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-integration-response.html)di *Referensi AWS CLI Perintah*. 

### `update-integration`
<a name="api-gateway_UpdateIntegration_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk menambahkan Template Pemetaan 'Content-Type: application/json' yang dikonfigurasi dengan Input Passthrough**  
Perintah:  

```
aws apigateway update-integration \
    --rest-api-id a1b2c3d4e5 \
    --resource-id a1b2c3 \
    --http-method POST \
    --patch-operations "op='add',path='/requestTemplates/application~1json'"
```
**Untuk memperbarui (mengganti) Template Pemetaan 'Content-Type: application/json' yang dikonfigurasi dengan templat khusus**  
Perintah:  

```
aws apigateway update-integration \
    --rest-api-id a1b2c3d4e5 \
    --resource-id a1b2c3 \
    --http-method POST \
    --patch-operations "op='replace',path='/requestTemplates/application~1json',value='{"example": "json"}'"
```
**Untuk memperbarui (mengganti) template khusus yang terkait dengan 'Content-Type: application/json' dengan Input Passthrough**  
Perintah:  

```
aws apigateway update-integration \
    --rest-api-id a1b2c3d4e5 \
    --resource-id a1b2c3 \
    --http-method POST \
    --patch-operations "op='replace',path='requestTemplates/application~1json'"
```
**Untuk menghapus Template Pemetaan 'Content-Type: application/json'**  
Perintah:  

```
aws apigateway update-integration \
    --rest-api-id a1b2c3d4e5 \
    --resource-id a1b2c3 \
    --http-method POST \
    --patch-operations "op='remove',path='/requestTemplates/application~1json'"
```
+  Untuk detail API, lihat [UpdateIntegration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-integration.html)di *Referensi AWS CLI Perintah*. 

### `update-method-response`
<a name="api-gateway_UpdateMethodResponse_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-method-response`.

**AWS CLI**  
**Untuk membuat header respons metode baru untuk respons 200 dalam metode dan mendefinisikannya sebagai tidak diperlukan (default)**  
Perintah:  

```
aws apigateway update-method-response --rest-api-id 1234123412 --resource-id a1b2c3 --http-method GET --status-code 200 --patch-operations op="add",path="/responseParameters/method.response.header.custom-header",value="false"
```
**Untuk menghapus model respons untuk respons 200 dalam suatu metode**  
Perintah:  

```
aws apigateway update-method-response --rest-api-id 1234123412 --resource-id a1b2c3 --http-method GET --status-code 200 --patch-operations op="remove",path="/responseModels/application~1json"
```
+  Untuk detail API, lihat [UpdateMethodResponse](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-method-response.html)di *Referensi AWS CLI Perintah*. 

### `update-method`
<a name="api-gateway_UpdateMethod_cli_2_topic"></a>

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

**AWS CLI**  
**Contoh 1: Untuk memodifikasi metode agar memerlukan kunci API**  
`update-method`Contoh berikut memodifikasi metode untuk memerlukan kunci API.  

```
aws apigateway update-method \
    --rest-api-id 1234123412 \
    --resource-id a1b2c3 \
    --http-method GET \
    --patch-operations op="replace",path="/apiKeyRequired",value="true"
```
Output:  

```
{
    "httpMethod": "GET",
    "authorizationType": "NONE",
    "apiKeyRequired": true,
    "methodResponses": {
        "200": {
            "statusCode": "200",
            "responseModels": {}
        }
    },
    "methodIntegration": {
        "type": "AWS",
        "httpMethod": "POST",
        "uri": "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:123456789111:function:hello-world/invocations",
        "passthroughBehavior": "WHEN_NO_MATCH",
        "contentHandling": "CONVERT_TO_TEXT",
        "timeoutInMillis": 29000,
        "cacheNamespace": "h7i8j9",
        "cacheKeyParameters": [],
        "integrationResponses": {
            "200": {
                "statusCode": "200",
                "responseTemplates": {}
            }
        }
    }
}
```
**Contoh 2: Untuk memodifikasi metode untuk meminta otorisasi IAM**  
`update-method`Contoh berikut memodifikasi metode untuk memerlukan otorisasi IAM.  

```
aws apigateway update-method \
    --rest-api-id 1234123412 \
    --resource-id a1b2c3 \
    --http-method GET \
    --patch-operations op="replace",path="/authorizationType",value="AWS_IAM"
```
Output:  

```
 {
    "httpMethod": "GET",
    "authorizationType": "AWS_IAM",
    "apiKeyRequired": false,
    "methodResponses": {
        "200": {
            "statusCode": "200",
            "responseModels": {}
        }
    },
    "methodIntegration": {
        "type": "AWS",
        "httpMethod": "POST",
        "uri": "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:123456789111:function:hello-world/invocations",
        "passthroughBehavior": "WHEN_NO_MATCH",
        "contentHandling": "CONVERT_TO_TEXT",
        "timeoutInMillis": 29000,
        "cacheNamespace": "h7i8j9",
        "cacheKeyParameters": [],
        "integrationResponses": {
            "200": {
                "statusCode": "200",
                "responseTemplates": {}
            }
        }
    }
}
```
**Contoh 3: Untuk memodifikasi metode untuk meminta otorisasi Lambda**  
`update-method`Contoh berikut memodifikasi metode untuk otorisasi Lambda yang diperlukan.  

```
aws apigateway update-method --rest-api-id 1234123412 \
    --resource-id a1b2c3 \
    --http-method GET \
    --patch-operations op="replace",path="/authorizationType",value="CUSTOM" op="replace",path="/authorizerId",value="e4f5g6"
```
Output:  

```
 {
    "httpMethod": "GET",
    "authorizationType": "CUSTOM",
    "authorizerId" : "e4f5g6",
    "apiKeyRequired": false,
    "methodResponses": {
        "200": {
            "statusCode": "200",
            "responseModels": {}
        }
    },
    "methodIntegration": {
        "type": "AWS",
        "httpMethod": "POST",
        "uri": "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:123456789111:function:hello-world/invocations",
        "passthroughBehavior": "WHEN_NO_MATCH",
        "contentHandling": "CONVERT_TO_TEXT",
        "timeoutInMillis": 29000,
        "cacheNamespace": "h7i8j9",
        "cacheKeyParameters": [],
        "integrationResponses": {
            "200": {
                "statusCode": "200",
                "responseTemplates": {}
            }
        }
    }
}
```
Untuk informasi selengkapnya, lihat [Membuat, mengonfigurasi, dan menguji paket penggunaan menggunakan API Gateway CLI dan REST API](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-usage-plans-with-rest-api.html) serta [Mengontrol dan mengelola akses ke REST API di API Gateway di Panduan](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-control-access-to-api.html) *Pengembang Amazon API Gateway*.  
+  Untuk detail API, lihat [UpdateMethod](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-method.html)di *Referensi AWS CLI Perintah*. 

### `update-model`
<a name="api-gateway_UpdateModel_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk mengubah deskripsi model dalam API**  
Perintah:  

```
aws apigateway update-model --rest-api-id 1234123412 --model-name 'Empty' --patch-operations op=replace,path=/description,value='New Description'
```
**Untuk mengubah skema model dalam API**  
Perintah:  

```
aws apigateway update-model --rest-api-id 1234123412 --model-name 'Empty' --patch-operations op=replace,path=/schema,value='"{ \"$schema\": \"http://json-schema.org/draft-04/schema#\", \"title\" : \"Empty Schema\", \"type\" : \"object\" }"'
```
+  Untuk detail API, lihat [UpdateModel](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-model.html)di *Referensi AWS CLI Perintah*. 

### `update-resource`
<a name="api-gateway_UpdateResource_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk memindahkan sumber daya dan menempatkannya di bawah sumber daya induk yang berbeda di API**  
Perintah:  

```
aws apigateway update-resource --rest-api-id 1234123412 --resource-id 1a2b3c --patch-operations op=replace,path=/parentId,value='3c2b1a'
```
Output:  

```
{
    "path": "/resource",
    "pathPart": "resource",
    "id": "1a2b3c",
    "parentId": "3c2b1a"
}
```
**Untuk mengganti nama sumber daya (pathPart) di API**  
Perintah:  

```
aws apigateway update-resource --rest-api-id 1234123412 --resource-id 1a2b3c --patch-operations op=replace,path=/pathPart,value=newresourcename
```
Output:  

```
{
    "path": "/newresourcename",
    "pathPart": "newresourcename",
    "id": "1a2b3c",
    "parentId": "3c2b1a"
}
```
+  Untuk detail API, lihat [UpdateResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-resource.html)di *Referensi AWS CLI Perintah*. 

### `update-rest-api`
<a name="api-gateway_UpdateRestApi_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-rest-api`.

**AWS CLI**  
**Untuk mengubah nama API**  
Perintah:  

```
aws apigateway update-rest-api --rest-api-id 1234123412 --patch-operations op=replace,path=/name,value='New Name'
```
**Untuk mengubah deskripsi API**  
Perintah:  

```
aws apigateway update-rest-api --rest-api-id 1234123412 --patch-operations op=replace,path=/description,value='New Description'
```
+  Untuk detail API, lihat [UpdateRestApi](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-rest-api.html)di *Referensi AWS CLI Perintah*. 

### `update-stage`
<a name="api-gateway_UpdateStage_cli_2_topic"></a>

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

**AWS CLI**  
**Contoh 1: Untuk mengganti pengaturan panggung untuk sumber daya dan metode**  
`update-stage`Contoh berikut mengesampingkan pengaturan panggung dan mematikan request/response logging penuh untuk sumber daya dan metode tertentu.  

```
aws apigateway update-stage \
    --rest-api-id 1234123412 \
    --stage-name 'dev' \
    --patch-operations op=replace,path=/~1resourceName/GET/logging/dataTrace,value=false
```
Output:  

```
{
    "deploymentId": "5ubd17",
    "stageName": "dev",
    "cacheClusterEnabled": false,
    "cacheClusterStatus": "NOT_AVAILABLE",
    "methodSettings": {
        "~1resourceName/GET": {
            "metricsEnabled": false,
            "dataTraceEnabled": false,
            "throttlingBurstLimit": 5000,
            "throttlingRateLimit": 10000.0,
            "cachingEnabled": false,
            "cacheTtlInSeconds": 300,
            "cacheDataEncrypted": false,
            "requireAuthorizationForCacheControl": true,
            "unauthorizedCacheControlHeaderStrategy": "SUCCEED_WITH_RESPONSE_HEADER"
        }
    },
    "tracingEnabled": false,
    "createdDate": "2022-07-18T10:11:18-07:00",
    "lastUpdatedDate": "2022-07-18T10:19:04-07:00"
}
```
Untuk informasi selengkapnya, lihat [Menyiapkan tahapan untuk REST API](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-stages.html) di *Panduan Pengembang Amazon API Gateway*.  
**Contoh 2: Untuk memperbarui pengaturan tahap untuk semua sumber daya dan metode tahap API**  
`update-stage`Contoh berikut mengaktifkan request/response pencatatan penuh untuk semua sumber daya dan metode tahap API.  

```
aws apigateway update-stage \
    --rest-api-id 1234123412 \
    --stage-name 'dev' \
    --patch-operations 'op=replace,path=/*/*/logging/dataTrace,value=true'
```
Output:  

```
{
    "deploymentId": "5ubd17",
    "stageName": "dev",
    "cacheClusterEnabled": false,
    "cacheClusterStatus": "NOT_AVAILABLE",
    "methodSettings": {
        "*/*": {
            "metricsEnabled": false,
            "dataTraceEnabled": true,
            "throttlingBurstLimit": 5000,
            "throttlingRateLimit": 10000.0,
            "cachingEnabled": false,
            "cacheTtlInSeconds": 300,
            "cacheDataEncrypted": false,
            "requireAuthorizationForCacheControl": true,
            "unauthorizedCacheControlHeaderStrategy": "SUCCEED_WITH_RESPONSE_HEADER"
        }
    },
    "tracingEnabled": false,
    "createdDate": "2022-07-18T10:11:18-07:00",
    "lastUpdatedDate": "2022-07-18T10:31:04-07:00"
}
```
Untuk informasi selengkapnya, lihat [Menyiapkan tahapan untuk REST API](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-stages.html) di *Panduan Pengembang Amazon API Gateway*.  
+  Untuk detail API, lihat [UpdateStage](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-stage.html)di *Referensi AWS CLI Perintah*. 

### `update-usage-plan`
<a name="api-gateway_UpdateUsagePlan_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-usage-plan`.

**AWS CLI**  
**Untuk mengubah periode yang ditentukan dalam Rencana Penggunaan**  
Perintah:  

```
aws apigateway update-usage-plan --usage-plan-id a1b2c3 --patch-operations op="replace",path="/quota/period",value="MONTH"
```
**Untuk mengubah batas kuota yang ditentukan dalam Paket Penggunaan**  
Perintah:  

```
aws apigateway update-usage-plan --usage-plan-id a1b2c3 --patch-operations op="replace",path="/quota/limit",value="500"
```
**Untuk mengubah batas laju throttle yang ditentukan dalam Paket Penggunaan**  
Perintah:  

```
aws apigateway update-usage-plan --usage-plan-id a1b2c3 --patch-operations op="replace",path="/throttle/rateLimit",value="10"
```
**Untuk mengubah batas throttle burst yang ditentukan dalam Paket Penggunaan**  
Perintah:  

```
aws apigateway update-usage-plan --usage-plan-id a1b2c3 --patch-operations op="replace",path="/throttle/burstLimit",value="20"
```
+  Untuk detail API, lihat [UpdateUsagePlan](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-usage-plan.html)di *Referensi AWS CLI Perintah*. 

### `update-usage`
<a name="api-gateway_UpdateUsage_cli_2_topic"></a>

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

**AWS CLI**  
**Untuk memodifikasi sementara kuota pada kunci API untuk periode saat ini yang ditentukan dalam Paket Penggunaan**  
Perintah:  

```
aws apigateway update-usage --usage-plan-id a1b2c3 --key-id 1NbjQzMReAkeEQPNAW8r3dXsU2rDD7fc7f2Sipnu --patch-operations op="replace",path="/remaining",value="50"
```
+  Untuk detail API, lihat [UpdateUsage](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-usage.html)di *Referensi AWS CLI Perintah*. 

### `update-vpc-link`
<a name="api-gateway_UpdateVpcLink_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-vpc-link`.

**AWS CLI**  
**Contoh 1: Untuk memperbarui nama tautan VPC yang ada**  
`update-vpc-link`Contoh berikut memperbarui nama tautan VPC yang ditentukan.  

```
aws apigateway update-vpc-link  \
    --vpc-link-id ab3de6 \
    --patch-operations op=replace,path=/name,value=my-vpc-link
```
Output:  

```
{
    "id": "ab3de6",
    "name": "my-vpc-link",
    "targetArns": [
        "arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/net/my-lb/12a456s89aaa12345"
    ],
    "status": "AVAILABLE",
    "statusMessage": "Your vpc link is ready for use",
    "tags": {}
}
```
Untuk informasi selengkapnya, lihat [Memperbarui tautan VPC yang ada](https://docs.aws.amazon.com/cli/latest/reference/apigateway/update-vpc-link.html) di Referensi Perintah *AWS CLI*.  
**Contoh 2: Untuk memperbarui nama dan deskripsi tautan VPC yang ada**  
`update-vpc-link`Contoh berikut memperbarui nama link VPC yang ditentukan.  

```
aws apigateway update-vpc-link  \
    --vpc-link-id ab3de6 \
    --patch-operations op=replace,path=/name,value=my-vpc-link op=replace,path=/description,value="My custom description"
```
Output:  

```
{
    "id": "ab3de6",
    "name": "my-vpc-link",
    "description": "My custom description",
    "targetArns": [
        "arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/net/my-lb/12a456s89aaa12345"
    ],
    "status": "AVAILABLE",
    "statusMessage": "Your vpc link is ready for use",
    "tags": {}
}
```
Untuk informasi selengkapnya, lihat [Memperbarui tautan VPC yang ada](https://docs.aws.amazon.com/cli/latest/reference/apigateway/update-vpc-link.html) di Referensi Perintah *AWS CLI*.  
+  Untuk detail API, lihat [UpdateVpcLink](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-vpc-link.html)di *Referensi AWS CLI Perintah*. 