

Doc AWS SDK 예제 GitHub 리포지토리에서 더 많은 SDK 예제를 사용할 수 있습니다. [AWS](https://github.com/awsdocs/aws-doc-sdk-examples) 

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# 를 사용한 API Gateway 예제 AWS CLI
<a name="cli_2_api-gateway_code_examples"></a>

다음 코드 예제에서는 API Gateway와 AWS Command Line Interface 함께를 사용하여 작업을 수행하고 일반적인 시나리오를 구현하는 방법을 보여줍니다.

*작업*은 대규모 프로그램에서 발췌한 코드이며 컨텍스트에 맞춰 실행해야 합니다. 작업은 개별 서비스 함수를 직접적으로 호출하는 방법을 보여주며 관련 시나리오의 컨텍스트에 맞는 작업을 볼 수 있습니다.

각 예시에는 전체 소스 코드에 대한 링크가 포함되어 있으며, 여기에서 컨텍스트에 맞춰 코드를 설정하고 실행하는 방법에 대한 지침을 찾을 수 있습니다.

**Topics**
+ [작업](#actions)

## 작업
<a name="actions"></a>

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

다음 코드 예시는 `create-api-key`의 사용 방법을 보여줍니다.

**AWS CLI**  
**기존 API 및 스테이지에 대해 활성화된 API 키를 생성하는 방법**  
명령:  

```
aws apigateway create-api-key --name 'Dev API Key' --description 'Used for development' --enabled --stage-keys restApiId='a1b2c3d4e5',stageName='dev'
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateApiKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-api-key.html)를 참조하세요.

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

다음 코드 예시는 `create-authorizer`의 사용 방법을 보여줍니다.

**AWS CLI**  
**예제 1: API에 대해 토큰 기반 API Gateway 사용자 지정 권한 부여자를 생성하는 방법**  
다음 `create-authorizer` 예제에서는 토큰 기반 권한 부여자를 생성합니다.  

```
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
```
출력:  

```
{
    "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"
}
```
**예제 2: API에 대해 Cognito 사용자 풀 기반 API Gateway 사용자 지정 권한 부여자를 생성하는 방법**  
다음 `create-authorizer` 예제에서는 Cognito 사용자 풀 기반 API Gateway 사용자 지정 권한 부여자를 생성합니다.  

```
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'
```
출력:  

```
{
    "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"
}
```
**예제 3: API에 대해 요청 기반 API Gateway 사용자 지정 권한 부여자를 생성하는 방법**  
다음 `create-authorizer` 예제에서는 요청 기반 권한 부여자를 생성합니다.  

```
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
```
출력:  

```
{
    "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
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateAuthorizer](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-authorizer.html)를 참조하세요.

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

다음 코드 예시는 `create-base-path-mapping`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용자 지정 도메인 이름의 기본 경로 매핑을 생성하는 방법**  
명령:  

```
aws apigateway create-base-path-mapping --domain-name subdomain.domain.tld --rest-api-id 1234123412 --stage prod --base-path v1
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateBasePathMapping](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-base-path-mapping.html)을 참조하세요.

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

다음 코드 예시는 `create-deployment`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API용으로 구성된 리소스를 새 스테이지에 배포하는 방법**  
명령:  

```
aws apigateway create-deployment --rest-api-id 1234123412 --stage-name dev --stage-description 'Development Stage' --description 'First deployment to the dev stage'
```
**API용으로 구성된 리소스를 기존 스테이지에 배포하는 방법**  
명령:  

```
aws apigateway create-deployment --rest-api-id 1234123412 --stage-name dev --description 'Second deployment to the dev stage'
```
**API용으로 구성된 리소스를 기존 스테이지에 스테이지 변수와 함께 배포하는 방법**  
aws apigateway create-deployment --rest-api-id 1,234,123,412 --stage-name dev --description 'Third deployment to the dev stage' --variables key='value',otherKey='otherValue'  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateDeployment](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-deployment.html)를 참조하세요.

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

다음 코드 예시는 `create-domain-name-access-association`의 사용 방법을 보여줍니다.

**AWS CLI**  
**도메인 이름 액세스 연결을 생성하려면**  
다음 `create-domain-name-access-association` 예제에서는 프라이빗 사용자 지정 도메인 이름과 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
```
출력:  

```
{
    "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"
}
```
자세한 내용은 *Amazon API Gateway 개발자 안내서*의 [API Gateway에서 프라이빗 API에 대한 사용자 지정 도메인 이름](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-custom-domains.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateDomainNameAccessAssociation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-domain-name-access-association.html) 섹션을 참조하세요.

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

다음 코드 예시는 `create-domain-name`의 사용 방법을 보여줍니다.

**AWS CLI**  
**예제 1: 퍼블릭 사용자 지정 도메인 이름 생성**  
다음 `create-domain-name` 예제에서는 퍼블릭 사용자 지정 도메인 이름을 생성합니다.  

```
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'
```
출력:  

```
{
    "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"
}
```
자세한 내용은 *Amazon API Gateway 개발자 안내서*의 [API Gateway에서 퍼블릭 REST API에 대한 사용자 지정 도메인 이름](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html)을 참조하세요.  
**예제 2: 프라이빗 사용자 지정 도메인 이름 생성**  
다음 `create-domain-name` 예제에서는 프라이빗 사용자 지정 도메인 이름을 생성합니다.  

```
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
```
`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"
                }
            }
        }
    ]
}
```
출력:  

```
{
    "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\"}}}]}"
}
```
자세한 내용은 *Amazon API Gateway 개발자 안내서*의 [API Gateway에서 퍼블릭 REST API에 대한 사용자 지정 도메인 이름](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateDomainName](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-domain-name.html)을 참조하세요.

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

다음 코드 예시는 `create-model`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API에 대한 모델을 생성하는 방법**  
명령:  

```
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" } } } } }'
```
출력:  

```
{
    "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\" } } } } }"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateModel](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-model.html)을 참조하세요.

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

다음 코드 예시는 `create-resource`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API에서 리소스를 생성하는 방법**  
명령:  

```
aws apigateway create-resource --rest-api-id 1234123412 --parent-id a1b2c3 --path-part 'new-resource'
```
+  API 세부 정보는 **AWS CLI 명령 참조의 [CreateResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-resource.html)를 참조하세요.

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

다음 코드 예시는 `create-rest-api`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API를 생성하는 방법**  
명령:  

```
aws apigateway create-rest-api --name 'My First API' --description 'This is my first API'
```
**기존 API에서 복제 API를 생성하는 방법**  
명령:  

```
aws apigateway create-rest-api --name 'Copy of My First API' --description 'This is a copy of my first API' --clone-from 1234123412
```
+  API 세부 정보는 **AWS CLI 명령 참조의 [CreateRestApi](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-rest-api.html)를 참조하세요.

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

다음 코드 예시는 `create-stage`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API에서 기존 배포를 포함할 스테이지를 생성하는 방법**  
명령:  

```
aws apigateway create-stage --rest-api-id 1234123412 --stage-name 'dev' --description 'Development stage' --deployment-id a1b2c3
```
**API에서 기존 배포 및 사용자 지정 스테이지 변수를 포함할 스테이지를 생성하는 방법**  
명령:  

```
aws apigateway create-stage --rest-api-id 1234123412 --stage-name 'dev' --description 'Development stage' --deployment-id a1b2c3 --variables key='value',otherKey='otherValue'
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateStage](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-stage.html)를 참조하세요.

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

다음 코드 예시는 `create-usage-plan-key`의 사용 방법을 보여줍니다.

**AWS CLI**  
**기존 API 키를 사용 계획과 연결**  
명령:  

```
aws apigateway create-usage-plan-key --usage-plan-id a1b2c3 --key-type "API_KEY" --key-id 4vq3yryqm5
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateUsagePlanKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-usage-plan-key.html)를 참조하세요.

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

다음 코드 예시는 `create-usage-plan`의 사용 방법을 보여줍니다.

**AWS CLI**  
**월초에 재설정되는 스로틀 및 할당량 제한이 있는 사용 계획을 생성하는 방법**  
명령:  

```
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
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateUsagePlan](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/create-usage-plan.html)을 참조하세요.

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

다음 코드 예시는 `delete-api-key`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API 키를 삭제하는 방법**  
명령:  

```
aws apigateway delete-api-key --api-key 8bklk8bl1k3sB38D9B3l0enyWT8c09B30lkq0blk
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteApiKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-api-key.html)를 참조하세요.

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

다음 코드 예시는 `delete-authorizer`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API에서 사용자 지정 권한 부여자를 삭제하는 방법**  
명령:  

```
aws apigateway delete-authorizer --rest-api-id 1234123412 --authorizer-id 7gkfbo
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteAuthorizer](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-authorizer.html)를 참조하세요.

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

다음 코드 예시는 `delete-base-path-mapping`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용자 지정 도메인 이름의 기본 경로 매핑을 삭제하는 방법**  
명령:  

```
aws apigateway delete-base-path-mapping --domain-name 'api.domain.tld' --base-path 'dev'
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteBasePathMapping](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-base-path-mapping.html)을 참조하세요.

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

다음 코드 예시는 `delete-client-certificate`의 사용 방법을 보여줍니다.

**AWS CLI**  
**클라이언트 인증서를 삭제하는 방법**  
명령:  

```
aws apigateway delete-client-certificate --client-certificate-id a1b2c3
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteClientCertificate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-client-certificate.html)를 참조하세요.

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

다음 코드 예시는 `delete-deployment`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API에서 배포를 삭제하는 방법**  
명령:  

```
aws apigateway delete-deployment --rest-api-id 1234123412 --deployment-id a1b2c3
```
+  API 세부 정보는 **AWS CLI 명령 참조의 [DeleteDeployment](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-deployment.html)를 참조하세요.

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

다음 코드 예시는 `delete-domain-name-access-association`의 사용 방법을 보여줍니다.

**AWS CLI**  
**도메인 이름 액세스 연결을 삭제하려면**  
다음 `delete-domain-name-access-association` 예제에서는 프라이빗 사용자 지정 도메인 이름과 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
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *Amazon API Gateway 개발자 안내서*의 [API Gateway에서 프라이빗 API에 대한 사용자 지정 도메인 이름](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-custom-domains.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteDomainNameAccessAssociation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-domain-name-access-association.html) 섹션을 참조하세요.

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

다음 코드 예시는 `delete-domain-name`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용자 지정 도메인 이름을 삭제하는 방법**  
명령:  

```
aws apigateway delete-domain-name --domain-name 'api.domain.tld'
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteDomainName](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-domain-name.html)을 참조하세요.

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

다음 코드 예시는 `delete-integration-response`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API에서 지정된 리소스, 메서드 및 상태 코드에 대한 통합 응답을 삭제하는 방법**  
명령:  

```
aws apigateway delete-integration-response --rest-api-id 1234123412 --resource-id a1b2c3 --http-method GET --status-code 200
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteIntegrationResponse](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-integration-response.html)를 참조하세요.

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

다음 코드 예시는 `delete-integration`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API에서 지정된 리소스 및 메서드에 대한 통합을 삭제하는 방법**  
명령:  

```
aws apigateway delete-integration --rest-api-id 1234123412 --resource-id a1b2c3 --http-method GET
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteIntegration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-integration.html)을 참조하세요.

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

다음 코드 예시는 `delete-method-response`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API에서 지정된 리소스, 메서드 및 상태 코드에 대한 메서드 응답을 삭제하는 방법**  
명령:  

```
aws apigateway delete-method-response --rest-api-id 1234123412 --resource-id a1b2c3 --http-method GET --status-code 200
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteMethodResponse](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-method-response.html)를 참조하세요.

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

다음 코드 예시는 `delete-method`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API에서 지정된 리소스에 대한 메서드를 삭제하는 방법**  
명령:  

```
aws apigateway delete-method --rest-api-id 1234123412 --resource-id a1b2c3 --http-method GET
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteMethod](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-method.html)를 참조하세요.

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

다음 코드 예시는 `delete-model`의 사용 방법을 보여줍니다.

**AWS CLI**  
**지정된 API에서 모델을 삭제하는 방법**  
명령:  

```
aws apigateway delete-model --rest-api-id 1234123412 --model-name 'customModel'
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteModel](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-model.html)을 참조하세요.

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

다음 코드 예시는 `delete-resource`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API에서 리소스를 삭제하는 방법**  
명령:  

```
aws apigateway delete-resource --rest-api-id 1234123412 --resource-id a1b2c3
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-resource.html)를 참조하세요.

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

다음 코드 예시는 `delete-rest-api`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API를 삭제하는 방법**  
명령:  

```
aws apigateway delete-rest-api --rest-api-id 1234123412
```
+  API 세부 정보는 **AWS CLI 명령 참조의 [DeleteRestApi](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-rest-api.html)를 참조하세요.

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

다음 코드 예시는 `delete-stage`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API에서 스테이지를 삭제하는 방법**  
명령:  

```
aws apigateway delete-stage --rest-api-id 1234123412 --stage-name 'dev'
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteStage](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-stage.html)를 참조하세요.

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

다음 코드 예시는 `delete-usage-plan-key`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용 계획에서 API 키를 제거하는 방법**  
명령:  

```
aws apigateway delete-usage-plan-key --usage-plan-id a1b2c3 --key-id 1NbjQzMReAkeEQPNAW8r3dXsU2rDD7fc7f2Sipnu
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteUsagePlanKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-usage-plan-key.html)를 참조하세요.

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

다음 코드 예시는 `delete-usage-plan`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용 계획을 삭제하는 방법**  
명령:  

```
aws apigateway delete-usage-plan --usage-plan-id a1b2c3
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteUsagePlan](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/delete-usage-plan.html)을 참조하세요.

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

다음 코드 예시는 `flush-stage-authorizers-cache`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스테이지의 모든 권한 부여자 캐시 항목을 비우는 방법**  
명령:  

```
aws apigateway flush-stage-authorizers-cache --rest-api-id 1234123412 --stage-name dev
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [FlushStageAuthorizersCache](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/flush-stage-authorizers-cache.html)를 참조하세요.

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

다음 코드 예시는 `flush-stage-cache`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API 스테이지에 대한 캐시를 비우는 방법**  
다음 `flush-stage-cache` 예제에서는 스테이지의 캐시를 플러시합니다.  

```
aws apigateway flush-stage-cache \
    --rest-api-id 1234123412 \
    --stage-name dev
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *Amazon API Gateway 개발자 안내서*의 [API Gateway에서 API 스테이지 캐시 플러시](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html#flush-api-caching)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [FlushStageCache](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/flush-stage-cache.html)를 참조하세요.

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

다음 코드 예시는 `generate-client-certificate`의 사용 방법을 보여줍니다.

**AWS CLI**  
**클라이언트 측 SSL 인증서를 생성하는 방법**  
명령:  

```
aws apigateway generate-client-certificate --description 'My First Client Certificate'
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GenerateClientCertificate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/generate-client-certificate.html)를 참조하세요.

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

다음 코드 예시는 `get-account`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API Gateway 계정 설정을 가져오는 방법**  
명령:  

```
aws apigateway get-account
```
출력:  

```
{
    "cloudwatchRoleArn": "arn:aws:iam::123412341234:role/APIGatewayToCloudWatchLogsRole",
    "throttleSettings": {
        "rateLimit": 500.0,
        "burstLimit": 1000
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetAccount](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-account.html)를 참조하세요.

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

다음 코드 예시는 `get-api-key`의 사용 방법을 보여줍니다.

**AWS CLI**  
**특정 API 키에 대한 정보를 가져오는 방법**  
명령:  

```
aws apigateway get-api-key --api-key 8bklk8bl1k3sB38D9B3l0enyWT8c09B30lkq0blk
```
출력:  

```
{
    "description": "My first key",
    "enabled": true,
    "stageKeys": [
        "a1b2c3d4e5/dev",
        "e5d4c3b2a1/dev"
    ],
    "lastUpdatedDate": 1456184515,
    "createdDate": 1456184452,
    "id": "8bklk8bl1k3sB38D9B3l0enyWT8c09B30lkq0blk",
    "name": "My key"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetApiKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-api-key.html)를 참조하세요.

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

다음 코드 예시는 `get-api-keys`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API 키 목록을 가져오는 방법**  
명령:  

```
aws apigateway get-api-keys
```
출력:  

```
{
    "items": [
        {
            "description": "My first key",
            "enabled": true,
            "stageKeys": [
                "a1b2c3d4e5/dev",
                "e5d4c3b2a1/dev"
            ],
            "lastUpdatedDate": 1456184515,
            "createdDate": 1456184452,
            "id": "8bklk8bl1k3sB38D9B3l0enyWT8c09B30lkq0blk",
            "name": "My key"
        }
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetApiKeys](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-api-keys.html)를 참조하세요.

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

다음 코드 예시는 `get-authorizer`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API Gateway API별 권한 부여자 설정을 가져오는 방법**  
명령:  

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

```
{
    "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"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetAuthorizer](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-authorizer.html)를 참조하세요.

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

다음 코드 예시는 `get-authorizers`의 사용 방법을 보여줍니다.

**AWS CLI**  
**REST API에 대한 권한 부여자의 목록을 가져오는 방법**  
명령:  

```
aws apigateway get-authorizers --rest-api-id 1234123412
```
출력:  

```
{
    "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"
        }
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetAuthorizers](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-authorizers.html)를 참조하세요.

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

다음 코드 예시는 `get-base-path-mapping`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용자 지정 도메인 이름의 기본 경로 매핑을 가져오는 방법**  
명령:  

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

```
{
    "basePath": "v1",
    "restApiId": "1234w4321e",
    "stage": "api"
}
```
+  API 세부 정보는 **AWS CLI 명령 참조의 [GetBasePathMapping](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-base-path-mapping.html)을 참조하세요.

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

다음 코드 예시는 `get-base-path-mappings`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용자 지정 도메인 이름의 기본 경로 매핑들을 가져오는 방법**  
명령:  

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

```
{
    "items": [
        {
            "basePath": "(none)",
            "restApiId": "1234w4321e",
            "stage": "dev"
        },
        {
            "basePath": "v1",
            "restApiId": "1234w4321e",
            "stage": "api"
        }
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetBasePathMappings](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-base-path-mappings.html)를 참조하세요.

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

다음 코드 예시는 `get-client-certificate`의 사용 방법을 보여줍니다.

**AWS CLI**  
**클라이언트 인증서를 가져오는 방법**  
명령:  

```
aws apigateway get-client-certificate --client-certificate-id a1b2c3
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetClientCertificate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-client-certificate.html)를 참조하세요.

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

다음 코드 예시는 `get-client-certificates`의 사용 방법을 보여줍니다.

**AWS CLI**  
**클라이언트 인증서의 목록을 가져오는 방법**  
명령:  

```
aws apigateway get-client-certificates
```
출력:  

```
{
    "items": [
        {
            "pemEncodedCertificate": "-----BEGIN CERTIFICATE----- <certificate content> -----END CERTIFICATE-----",
            "clientCertificateId": "a1b2c3",
            "expirationDate": 1483556561,
            "description": "My Client Certificate",
            "createdDate": 1452020561
        }
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetClientCertificates](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-client-certificates.html)를 참조하세요.

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

다음 코드 예시는 `get-deployment`의 사용 방법을 보여줍니다.

**AWS CLI**  
**배포에 대한 정보를 가져오는 방법**  
명령:  

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

```
{
    "description": "myDeployment",
    "id": "ztt4m2",
    "createdDate": 1455218022
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetDeployment](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-deployment.html) 섹션을 참조하세요.

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

다음 코드 예시는 `get-deployments`의 사용 방법을 보여줍니다.

**AWS CLI**  
**REST API에 대한 배포의 목록을 가져오는 방법**  
명령:  

```
aws apigateway get-deployments --rest-api-id 1234123412
```
출력:  

```
{
    "items": [
        {
            "createdDate": 1453797217,
            "id": "0a2b4c",
            "description": "Deployed my API for the first time"
        }
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetDeployments](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-deployments.html)를 참조하세요.

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

다음 코드 예시는 `get-domain-name-access-associations`의 사용 방법을 보여줍니다.

**AWS CLI**  
**예제 1: 모든 도메인 이름 액세스 연결 나열**  
다음 `get-domain-name-access-associations` 예제에서는 모든 도메인 이름 액세스 연결을 나열합니다.  

```
aws apigateway get-domain-name-access-associations
```
출력:  

```
{
    "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"
        }
    ]
}
```
자세한 내용은 *Amazon API Gateway 개발자 안내서*의 [API Gateway에서 프라이빗 API에 대한 사용자 지정 도메인 이름](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-custom-domains.html)을 참조하세요.  
**예제 2:이 AWS 계정이 소유한 모든 도메인 이름 액세스 연결을 나열하는 방법**  
다음 `get-domain-name-access-associations` 예시에서는 현재 AWS 계정이 소유한 모든 도메인 이름 액세스 연결을 나열합니다.  

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

```
{
    "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"
        }
    ]
}
```
자세한 내용은 *Amazon API Gateway 개발자 안내서*의 [API Gateway에서 프라이빗 API에 대한 사용자 지정 도메인 이름](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-custom-domains.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetDomainNameAccessAssociations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-domain-name-access-associations.html)를 참조하세요.

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

다음 코드 예시는 `get-domain-name`의 사용 방법을 보여줍니다.

**AWS CLI**  
**예제 1: 퍼블릭 사용자 지정 도메인 이름에 대한 정보를 가져오는 방법**  
다음 `get-domain-name` 예제에서는 퍼블릭 사용자 지정 도메인 이름에 대한 정보를 가져옵니다.  

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

```
{
    "domainName": "api.domain.tld",
    "distributionDomainName": "d1a2f3a4c5o6d.cloudfront.net",
    "certificateName": "uploadedCertificate",
    "certificateUploadDate": 1462565487
}
```
자세한 내용은 *Amazon API Gateway 개발자 안내서*의 [API Gateway에서 퍼블릭 REST API에 대한 사용자 지정 도메인 이름](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html)을 참조하세요.  
**예제 2: 프라이빗 사용자 지정 도메인 이름에 대한 정보를 가져오는 방법**  
다음 `get-domain-name` 예제에서는 프라이빗 사용자 지정 도메인 이름에 대한 정보를 가져옵니다.  

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

```
{
    "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\"}}}]}"
}
```
자세한 내용은 *Amazon API Gateway 개발자 안내서*의 [API Gateway에서 퍼블릭 REST API에 대한 사용자 지정 도메인 이름](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetDomainName](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-domain-name.html)을 참조하세요.

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

다음 코드 예시는 `get-domain-names`의 사용 방법을 보여줍니다.

**AWS CLI**  
**예제 1: 사용자 지정 도메인 이름의 목록을 가져오는 방법**  
다음 `get-domain-names` 명령은 도메인 이름 목록을 가져옵니다.  

```
aws apigateway get-domain-names
```
출력:  

```
{
    "items": [
        {
            "distributionDomainName": "d9511k3l09bkd.cloudfront.net",
            "certificateUploadDate": 1452812505,
            "certificateName": "my_custom_domain-certificate",
            "domainName": "subdomain.domain.tld"
        }
    ]
}
```
자세한 내용은 *Amazon API Gateway 개발자 안내서*의 [API Gateway에서 프라이빗 API에 대한 사용자 지정 도메인 이름](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-custom-domains.html)을 참조하세요.  
**예제 2:이 AWS 계정이 소유한 사용자 지정 도메인 이름 목록을 가져오는 방법**  
다음 `get-domain-names` 명령은이 AWS 계정이 소유한 도메인 이름 목록을 가져옵니다.  

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

```
{
    "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"
        }
    ]
}
```
자세한 내용은 *Amazon API Gateway 개발자 안내서*의 [API Gateway에서 프라이빗 API에 대한 사용자 지정 도메인 이름](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-custom-domains.html)을 참조하세요.  
**예제 3: 도메인 이름 액세스 연결을 생성할 수 있는 다른 AWS 계정이 소유한 사용자 지정 도메인 이름 목록을 가져오는 방법.**  
다음 `get-domain-names` 명령은 도메인 이름 액세스 연결을 생성할 수 있는 액세스 권한이 있는 다른 AWS 계정이 소유한 도메인 이름 목록을 가져옵니다.  

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

```
{
    "items": [
        {
            "domainName": "my.private.domain.tld",
            "domainNameId": "abcd1234",
            "domainNameArn": "arn:aws:apigateway:us-east-1:012345678910:/domainnames/my.private.domain.tld+abcd1234"
        }
    ]
}
```
자세한 내용은 *Amazon API Gateway 개발자 안내서*의 [API Gateway에서 프라이빗 API에 대한 사용자 지정 도메인 이름](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-custom-domains.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetDomainNames](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-domain-names.html)를 참조하세요.

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

다음 코드 예시는 `get-export`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스테이지에 대한 JSON Swagger 템플릿을 가져오는 방법**  
명령:  

```
aws apigateway get-export --rest-api-id a1b2c3d4e5 --stage-name dev --export-type swagger /path/to/filename.json
```
**스테이지에 대한 JSON Swagger 템플릿 \$1 API Gateway 확장을 가져오는 방법**  
명령:  

```
aws apigateway get-export --parameters extensions='integrations' --rest-api-id a1b2c3d4e5 --stage-name dev --export-type swagger /path/to/filename.json
```
**스테이지에 대한 JSON Swagger 템플릿 \$1 Postman 확장을 가져오는 방법**  
명령:  

```
aws apigateway get-export --parameters extensions='postman' --rest-api-id a1b2c3d4e5 --stage-name dev --export-type swagger /path/to/filename.json
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetExport](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-export.html)를 참조하세요.

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

다음 코드 예시는 `get-integration-response`의 사용 방법을 보여줍니다.

**AWS CLI**  
**REST API의 리소스에서 정의된 HTTP 메서드에 대한 통합 응답 구성을 가져오는 방법**  
명령:  

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

```
{
    "statusCode": "200",
    "responseTemplates": {
        "application/json": null
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetIntegrationResponse](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-integration-response.html)를 참조하세요.

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

다음 코드 예시는 `get-integration`의 사용 방법을 보여줍니다.

**AWS CLI**  
**REST API의 리소스에서 정의된 HTTP 메서드에 대한 통합 구성을 가져오는 방법**  
명령:  

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

```
{
    "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"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetIntegration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-integration.html)을 참조하세요.

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

다음 코드 예시는 `get-method-response`의 사용 방법을 보여줍니다.

**AWS CLI**  
**REST API의 리소스에서 정의된 HTTP 메서드에 대한 메서드 응답 리소스 구성을 가져오는 방법**  
명령:  

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

```
{
    "responseModels": {
        "application/json": "Empty"
    },
    "statusCode": "200"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetMethodResponse](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-method-response.html)를 참조하세요.

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

다음 코드 예시는 `get-method`의 사용 방법을 보여줍니다.

**AWS CLI**  
**REST API의 리소스에서 정의된 HTTP 메서드에 대한 메서드 리소스 구성을 가져오는 방법**  
명령:  

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

```
{
    "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"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetMethod](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-method.html)를 참조하세요.

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

다음 코드 예시는 `get-model-template`의 사용 방법을 보여줍니다.

**AWS CLI**  
**REST API에서 정의된 모델에 대한 매핑 템플릿을 가져오는 방법**  
명령:  

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

```
{
    "value": "#set($inputRoot = $input.path('$'))\n{ }"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetModelTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-model-template.html)을 참조하세요.

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

다음 코드 예시는 `get-model`의 사용 방법을 보여줍니다.

**AWS CLI**  
**REST API에서 정의된 모델에 대한 구성을 가져오는 방법**  
명령:  

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

```
{
    "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}"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetModel](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-model.html)을 참조하세요.

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

다음 코드 예시는 `get-models`의 사용 방법을 보여줍니다.

**AWS CLI**  
**REST API에 대한 모델의 목록을 가져오는 방법**  
명령:  

```
aws apigateway get-models --rest-api-id 1234123412
```
출력:  

```
{
    "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"
        }
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetModels](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-models.html)를 참조하세요.

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

다음 코드 예시는 `get-resource`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리소스에 대한 정보를 가져오는 방법**  
명령:  

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

```
{
    "path": "/path",
    "pathPart": "path",
    "id": "zwo0y3",
    "parentId": "uyokt6ij2g"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-resource.html)를 참조하세요.

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

다음 코드 예시는 `get-resources`의 사용 방법을 보여줍니다.

**AWS CLI**  
**REST API에 사용할 리소스 목록을 가져오는 방법**  
명령:  

```
aws apigateway get-resources --rest-api-id 1234123412
```
출력:  

```
{
    "items": [
        {
            "path": "/resource/subresource",
            "resourceMethods": {
                "POST": {}
            },
            "id": "024ace",
            "pathPart": "subresource",
            "parentId": "ai5b02"
        }
    ]
}
```
+  API 세부 정보는 **AWS CLI 명령 참조의 [GetResources](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-resources.html)를 참조하세요.

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

다음 코드 예시는 `get-rest-api`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API에 대한 정보를 가져오는 방법**  
명령:  

```
aws apigateway get-rest-api --rest-api-id 1234123412
```
출력:  

```
{
    "name": "myAPI",
    "id": "o1y243m4f5",
    "createdDate": 1453416433
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetRestApi](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-rest-api.html)를 참조하세요.

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

다음 코드 예시는 `get-rest-apis`의 사용 방법을 보여줍니다.

**AWS CLI**  
**REST API 목록을 가져오는 방법**  
명령:  

```
aws apigateway get-rest-apis
```
출력:  

```
{
    "items": [
        {
            "createdDate": 1438884790,
            "id": "12s44z21rb",
            "name": "My First API"
        }
    ]
}
```
+  API 세부 정보는 **AWS CLI 명령 참조의 [GetRestApis](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-rest-apis.html)를 참조하세요.

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

다음 코드 예시는 `get-sdk`의 사용 방법을 보여줍니다.

**AWS CLI**  
**REST API 스테이지에 대한 Android SDK를 가져오는 방법**  
명령:  

```
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
```
출력:  

```
{
    "contentType": "application/octet-stream",
    "contentDisposition": "attachment; filename=\"android_2016-02-22_23-52Z.zip\""
}
```
**REST API 스테이지에 대한 IOS SDK를 가져오는 방법**  
명령:  

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

```
{
    "contentType": "application/octet-stream",
    "contentDisposition": "attachment; filename=\"objectivec_2016-02-22_23-52Z.zip\""
}
```
**REST API 스테이지에 대한 Javascript SDK를 가져오는 방법**  
명령:  

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

```
{
    "contentType": "application/octet-stream",
    "contentDisposition": "attachment; filename=\"javascript_2016-02-22_23-52Z.zip\""
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetSdk](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-sdk.html)를 참조하세요.

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

다음 코드 예시는 `get-stage`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API의 스테이지에 대한 정보를 가져오는 방법**  
명령:  

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

```
{
    "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
        }
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetStage](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-stage.html)를 참조하세요.

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

다음 코드 예시는 `get-stages`의 사용 방법을 보여줍니다.

**AWS CLI**  
**REST API에 대한 스테이지의 목록을 가져오는 방법**  
명령:  

```
aws apigateway get-stages --rest-api-id 1234123412
```
출력:  

```
{
    "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
                }
            }
        }
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetStages](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-stages.html)를 참조하세요.

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

다음 코드 예시는 `get-usage-plan-key`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용 계획과 연결된 API 키의 세부 정보를 가져오는 방법**  
명령:  

```
aws apigateway get-usage-plan-key --usage-plan-id a1b2c3 --key-id 1NbjQzMReAkeEQPNAW8r3dXsU2rDD7fc7f2Sipnu
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetUsagePlanKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-usage-plan-key.html)를 참조하세요.

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

다음 코드 예시는 `get-usage-plan-keys`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용 계획과 연결된 API 키의 목록을 가져오는 방법**  
명령:  

```
aws apigateway get-usage-plan-keys --usage-plan-id a1b2c3
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetUsagePlanKeys](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-usage-plan-keys.html)를 참조하세요.

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

다음 코드 예시는 `get-usage-plan`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용 계획의 세부 정보를 가져오는 방법**  
명령:  

```
aws apigateway get-usage-plan --usage-plan-id a1b2c3
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetUsagePlan](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-usage-plan.html)을 참조하세요.

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

다음 코드 예시는 `get-usage-plans`의 사용 방법을 보여줍니다.

**AWS CLI**  
**모든 사용 계획의 세부 정보를 가져오는 방법**  
명령:  

```
aws apigateway get-usage-plans
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetUsagePlans](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-usage-plans.html)를 참조하세요.

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

다음 코드 예시는 `get-usage`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용 계획에 대한 사용 세부 정보를 가져오는 방법**  
명령:  

```
aws apigateway get-usage --usage-plan-id a1b2c3 --start-date "2016-08-16" --end-date "2016-08-17"
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetUsage](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-usage.html)를 참조하세요.

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

다음 코드 예시는 `import-rest-api`의 사용 방법을 보여줍니다.

**AWS CLI**  
**Swagger 템플릿을 가져오고 API를 생성하는 방법**  
명령:  

```
aws apigateway import-rest-api --body 'file:///path/to/API_Swagger_template.json'
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ImportRestApi](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/import-rest-api.html)를 참조하세요.

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

다음 코드 예시는 `put-integration-response`의 사용 방법을 보여줍니다.

**AWS CLI**  
**정의된 매핑 템플릿을 사용하여 통합 응답을 기본 응답으로 생성하는 방법**  
명령:  

```
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\"}"}'
```
**정규식이 400이고 헤더 값이 정적으로 정의된 통합 응답을 생성하는 방법**  
명령:  

```
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'"'"'"}'
```
+  API 세부 정보는 **AWS CLI 명령 참조의 [PutIntegrationResponse](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/put-integration-response.html)를 참조하세요.

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

다음 코드 예시는 `put-integration`의 사용 방법을 보여줍니다.

**AWS CLI**  
**모의 통합 요청을 생성하는 방법**  
명령:  

```
aws apigateway put-integration --rest-api-id 1234123412 --resource-id a1b2c3 --http-method GET --type MOCK --request-templates '{ "application/json": "{\"statusCode\": 200}" }'
```
**HTTP 통합 요청을 생성하는 방법**  
명령:  

```
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'
```
**Lambda 함수 엔드포인트를 사용하여 AWS 통합 요청을 생성하려면**  
명령:  

```
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'
```
+  API 세부 정보는 **AWS CLI 명령 참조의 [PutIntegration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/put-integration.html)을 참조하세요.

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

다음 코드 예시는 `put-method-response`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용자 지정 메서드 응답 헤더를 사용하여 지정된 상태 코드에서 메서드 응답을 생성하는 방법**  
명령:  

```
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"
```
+  API 세부 정보는 **AWS CLI 명령 참조의 [PutMethodResponse](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/put-method-response.html)를 참조하세요.

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

다음 코드 예시는 `put-method`의 사용 방법을 보여줍니다.

**AWS CLI**  
**권한 부여, API 키 및 사용자 지정 메서드 요청 헤더가 없는 API의 리소스에 대한 메서드를 생성하는 방법**  
명령:  

```
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"
```
+  API 세부 정보는 **AWS CLI 명령 참조의 [PutMethod](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/put-method.html)를 참조하세요.

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

다음 코드 예시는 `put-rest-api`의 사용 방법을 보여줍니다.

**AWS CLI**  
**Swagger 템플릿을 사용하여 기존 API를 덮어쓰는 방법**  
명령:  

```
aws apigateway put-rest-api --rest-api-id 1234123412 --mode overwrite --body 'fileb:///path/to/API_Swagger_template.json'
```
**Swagger 템플릿을 기존 API에 병합하는 방법**  
명령:  

```
aws apigateway put-rest-api --rest-api-id 1234123412 --mode merge --body 'fileb:///path/to/API_Swagger_template.json'
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [PutRestApi](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/put-rest-api.html)를 참조하세요.

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

다음 코드 예시는 `reject-domain-name-access-association`의 사용 방법을 보여줍니다.

**AWS CLI**  
**도메인 이름 액세스 연결을 거부하려면**  
다음 `reject-domain-name-access-association` 예제에서는 프라이빗 사용자 지정 도메인 이름과 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
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *Amazon API Gateway 개발자 안내서*의 [API Gateway에서 프라이빗 API에 대한 사용자 지정 도메인 이름](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-custom-domains.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [RejectDomainNameAccessAssociation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/reject-domain-name-access-association.html) 섹션을 참조하세요.

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

다음 코드 예시는 `test-invoke-authorizer`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용자 지정 권한 부여자에게 필수 헤더 및 값을 포함하여 보내는 요청의 호출을 테스트하는 방법**  
명령:  

```
aws apigateway test-invoke-authorizer --rest-api-id 1234123412 --authorizer-id 5yid1t --headers Authorization='Value'
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [TestInvokeAuthorizer](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/test-invoke-authorizer.html)를 참조하세요.

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

다음 코드 예시는 `test-invoke-method`의 사용 방법을 보여줍니다.

**AWS CLI**  
**GET 요청을 수행하여 API에서 루트 리소스의 호출을 테스트하는 방법**  
명령:  

```
aws apigateway test-invoke-method --rest-api-id 1234123412 --resource-id avl5sg8fw8 --http-method GET --path-with-query-string '/'
```
**경로 파라미터 값이 지정된 GET 요청을 수행하여 API에서 하위 리소스의 호출을 테스트하는 방법**  
명령:  

```
aws apigateway test-invoke-method --rest-api-id 1234123412 --resource-id 3gapai --http-method GET --path-with-query-string '/pets/1'
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [TestInvokeMethod](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/test-invoke-method.html)를 참조하세요.

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

다음 코드 예시는 `update-account`의 사용 방법을 보여줍니다.

**AWS CLI**  
**CloudWatch 로그에 로깅하는 IAM 역할 ARN을 변경하는 방법**  
명령:  

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

```
{
    "cloudwatchRoleArn": "arn:aws:iam::123412341234:role/APIGatewayToCloudWatchLogs",
    "throttleSettings": {
        "rateLimit": 1000.0,
        "burstLimit": 2000
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateAccount](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-account.html)를 참조하세요.

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

다음 코드 예시는 `update-api-key`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API 키의 이름을 변경하는 방법**  
명령:  

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

```
{
    "description": "currentDescription",
    "enabled": true,
    "stageKeys": [
        "41t2j324r5/dev"
    ],
    "lastUpdatedDate": 1470086052,
    "createdDate": 1445460347,
    "id": "sNvjQDMReA1vEQPNzW8r3dXsU2rrD7fcjm2SiMnu",
    "name": "newName"
}
```
**API 키를 비활성화하는 방법**  
명령:  

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

```
{
    "description": "currentDescription",
    "enabled": false,
    "stageKeys": [
        "41t2j324r5/dev"
    ],
    "lastUpdatedDate": 1470086052,
    "createdDate": 1445460347,
    "id": "sNvjQDMReA1vEQPNzW8r3dXsU2rrD7fcjm2SiMnu",
    "name": "newName"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateApiKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-api-key.html)를 참조하세요.

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

다음 코드 예시는 `update-authorizer`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용자 지정 권한 부여자의 이름을 변경하는 방법**  
명령:  

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

```
{
    "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"
}
```
**사용자 지정 권한 부여자가 호출하는 Lambda 함수를 변경하는 방법**  
명령:  

```
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'
```
출력:  

```
{
    "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"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateAuthorizer](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-authorizer.html)를 참조하세요.

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

다음 코드 예시는 `update-base-path-mapping`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용자 지정 도메인 이름의 기본 경로를 변경하는 방법**  
명령:  

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

```
{
    "basePath": "v1",
    "restApiId": "1234123412",
    "stage": "api"
}
```
+  API 세부 정보는 **AWS CLI 명령 참조의 [UpdateBasePathMapping](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-base-path-mapping.html)을 참조하세요.

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

다음 코드 예시는 `update-client-certificate`의 사용 방법을 보여줍니다.

**AWS CLI**  
**클라이언트 인증서의 설명을 업데이트하는 방법**  
명령:  

```
aws apigateway update-client-certificate --client-certificate-id a1b2c3 --patch-operations op='replace',path='/description',value='My new description'
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateClientCertificate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-client-certificate.html)를 참조하세요.

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

다음 코드 예시는 `update-deployment`의 사용 방법을 보여줍니다.

**AWS CLI**  
**배포의 설명을 변경하는 방법**  
명령:  

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

```
{
    "description": "newDescription",
    "id": "ztt4m2",
    "createdDate": 1455218022
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateDeployment](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-deployment.html)를 참조하세요.

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

다음 코드 예시는 `update-domain-name`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용자 지정 도메인 이름에 대한 인증서 이름을 변경하는 방법**  
다음 `update-domain-name` 예제에서는 사용자 지정 도메인에 대한 인증서 이름을 변경합니다.  

```
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'
```
출력:  

```
{
    "domainName": "api.domain.tld",
    "distributionDomainName": "d123456789012.cloudfront.net",
    "certificateArn": "arn:aws:acm:us-west-2:111122223333:certificate/CERTEXAMPLE123EXAMPLE",
    "certificateUploadDate": 1462565487
}
```
자세한 내용은 *Amazon API Gateway 개발자 안내서*의 [API Gateway에서 API에 대한 사용자 지정 도메인 이름 설정](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateDomainName](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-domain-name.html)을 참조하세요.

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

다음 코드 예시는 `update-integration-response`의 사용 방법을 보여줍니다.

**AWS CLI**  
**'\$1' 정적 매핑을 사용하도록 통합 응답 헤더를 변경하는 방법**  
명령:  

```
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='"'"'*'"'"'
```
출력:  

```
{
    "statusCode": "200",
    "responseParameters": {
        "method.response.header.Access-Control-Allow-Origin": "'*'"
    }
}
```
**통합 응답 헤더를 제거하는 방법**  
명령:  

```
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'
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateIntegrationResponse](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-integration-response.html)을 참조하세요.

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

다음 코드 예시는 `update-integration`의 사용 방법을 보여줍니다.

**AWS CLI**  
**Input Passthrough로 구성된 'Content-Type: application/json' 매핑 템플릿을 추가하는 방법**  
명령:  

```
aws apigateway update-integration \
    --rest-api-id a1b2c3d4e5 \
    --resource-id a1b2c3 \
    --http-method POST \
    --patch-operations "op='add',path='/requestTemplates/application~1json'"
```
**사용자 지정 템플릿으로 구성된 'Content-Type: application/json' 매핑 템플릿을 업데이트(교체)하는 방법**  
명령:  

```
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"}'"
```
**Input Passthrough가 있는 'Content-Type: application/json'과 연결된 사용자 지정 템플릿을 업데이트(교체)하는 방법**  
명령:  

```
aws apigateway update-integration \
    --rest-api-id a1b2c3d4e5 \
    --resource-id a1b2c3 \
    --http-method POST \
    --patch-operations "op='replace',path='requestTemplates/application~1json'"
```
**'Content-Type: application/json' 매핑 템플릿을 제거하는 방법**  
명령:  

```
aws apigateway update-integration \
    --rest-api-id a1b2c3d4e5 \
    --resource-id a1b2c3 \
    --http-method POST \
    --patch-operations "op='remove',path='/requestTemplates/application~1json'"
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateIntegration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-integration.html)을 참조하세요.

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

다음 코드 예시는 `update-method-response`의 사용 방법을 보여줍니다.

**AWS CLI**  
**메서드에서 200 응답에 대한 새 메서드 응답 헤더를 생성하고 이를 필요 없음(기본값)으로 정의하는 방법**  
명령:  

```
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"
```
**메서드에서 200 응답에 대한 응답 모델을 삭제하는 방법**  
명령:  

```
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"
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateMethodResponse](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-method-response.html)를 참조하세요.

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

다음 코드 예시는 `update-method`의 사용 방법을 보여줍니다.

**AWS CLI**  
**예제 1: API 키를 요구하도록 메서드를 수정하는 방법**  
다음 `update-method` 예제에서는 API 키를 요구하도록 메서드를 수정합니다.  

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

```
{
    "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": {}
            }
        }
    }
}
```
**예제 2: IAM 권한 부여를 요구하도록 메서드를 수정하는 방법**  
다음 `update-method` 예제에서는 IAM 권한 부여를 요구하도록 메서드를 수정합니다.  

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

```
 {
    "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": {}
            }
        }
    }
}
```
**예제 3: Lambda 권한 부여를 요구하도록 메서드를 수정하는 방법**  
다음 `update-method` 예제에서는 Lambda 권한 부여를 요구하도록 메서드를 수정합니다.  

```
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"
```
출력:  

```
 {
    "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": {}
            }
        }
    }
}
```
자세한 내용은 *Amazon API Gateway 개발자 안내서*의 [API Gateway CLI 및 REST API를 사용하여 사용 계획 생성, 구성 및 테스트](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-usage-plans-with-rest-api.html)와 [API Gateway에서 REST API에 대한 액세스 제어 및 관리](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-control-access-to-api.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateMethod](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-method.html)를 참조하세요.

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

다음 코드 예시는 `update-model`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API에서 모델의 설명을 변경하는 방법**  
명령:  

```
aws apigateway update-model --rest-api-id 1234123412 --model-name 'Empty' --patch-operations op=replace,path=/description,value='New Description'
```
**API에서 모델의 스키마를 변경하는 방법**  
명령:  

```
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\" }"'
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateModel](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-model.html)을 참조하세요.

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

다음 코드 예시는 `update-resource`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API에서 리소스를 이동하고 이를 다른 상위 리소스에 배치하는 방법**  
명령:  

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

```
{
    "path": "/resource",
    "pathPart": "resource",
    "id": "1a2b3c",
    "parentId": "3c2b1a"
}
```
**API에서 리소스(pathPart)의 이름을 바꾸는 방법**  
명령:  

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

```
{
    "path": "/newresourcename",
    "pathPart": "newresourcename",
    "id": "1a2b3c",
    "parentId": "3c2b1a"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-resource.html)를 참조하세요.

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

다음 코드 예시는 `update-rest-api`의 사용 방법을 보여줍니다.

**AWS CLI**  
**API의 이름을 변경하는 방법**  
명령:  

```
aws apigateway update-rest-api --rest-api-id 1234123412 --patch-operations op=replace,path=/name,value='New Name'
```
**API의 설명을 변경하는 방법**  
명령:  

```
aws apigateway update-rest-api --rest-api-id 1234123412 --patch-operations op=replace,path=/description,value='New Description'
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateRestApi](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-rest-api.html)를 참조하세요.

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

다음 코드 예시는 `update-stage`의 사용 방법을 보여줍니다.

**AWS CLI**  
**예제 1: 리소스 및 메서드에 대한 스테이지 설정을 재정의하는 방법**  
다음 `update-stage` 예제에서는 특정 리소스 및 메서드에 대한 스테이지 설정을 재정의하고 전체 요청/응답 로깅을 끕니다.  

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

```
{
    "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"
}
```
자세한 내용은 *Amazon API Gateway 개발자 안내서*의 [REST API에 대한 스테이지 설정](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-stages.html)을 참조하세요.  
**예제 2: API 스테이지의 모든 리소스 및 메서드에 대한 스테이지 설정을 업데이트하는 방법**  
다음 `update-stage` 예제에서는 API 스테이지의 모든 리소스 및 메서드에 대한 전체 요청/응답 로깅을 켭니다.  

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

```
{
    "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"
}
```
자세한 내용은 *Amazon API Gateway 개발자 안내서*의 [REST API에 대한 스테이지 설정](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-stages.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateStage](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-stage.html)를 참조하세요.

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

다음 코드 예시는 `update-usage-plan`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용 계획에서 정의된 기간을 변경하는 방법**  
명령:  

```
aws apigateway update-usage-plan --usage-plan-id a1b2c3 --patch-operations op="replace",path="/quota/period",value="MONTH"
```
**사용 계획에서 정의된 할당량 제한을 변경하는 방법**  
명령:  

```
aws apigateway update-usage-plan --usage-plan-id a1b2c3 --patch-operations op="replace",path="/quota/limit",value="500"
```
**사용 계획에서 정의된 스로틀 요율 제한을 변경하는 방법**  
명령:  

```
aws apigateway update-usage-plan --usage-plan-id a1b2c3 --patch-operations op="replace",path="/throttle/rateLimit",value="10"
```
**사용 계획에서 정의된 스로틀 버스트 제한을 변경하는 방법**  
명령:  

```
aws apigateway update-usage-plan --usage-plan-id a1b2c3 --patch-operations op="replace",path="/throttle/burstLimit",value="20"
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateUsagePlan](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-usage-plan.html)을 참조하세요.

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

다음 코드 예시는 `update-usage`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용 계획에서 정의된 현재 기간에 대해 API 키의 할당량을 일시적으로 수정하는 방법**  
명령:  

```
aws apigateway update-usage --usage-plan-id a1b2c3 --key-id 1NbjQzMReAkeEQPNAW8r3dXsU2rDD7fc7f2Sipnu --patch-operations op="replace",path="/remaining",value="50"
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateUsage](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-usage.html)를 참조하세요.

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

다음 코드 예시는 `update-vpc-link`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**예제 1: 기존 VPC 링크 이름 업데이트**  
다음 `update-vpc-link` 예제에서는 지정된 VPC 링크의 이름을 업데이트합니다.  

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

```
{
    "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": {}
}
```
자세한 내용은 *AWS CLI 명령 참조*의 [기존 VPC 링크 업데이트](https://docs.aws.amazon.com/cli/latest/reference/apigateway/update-vpc-link.html)를 참조하세요.  
**예제 2: 기존 VPC 링크 이름 및 설명 업데이트**  
다음 `update-vpc-link` 예제에서는 지정된 VPC 링크의 이름을 업데이트합니다.  

```
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"
```
출력:  

```
{
    "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": {}
}
```
자세한 내용은 *AWS CLI 명령 참조*의 [기존 VPC 링크 업데이트](https://docs.aws.amazon.com/cli/latest/reference/apigateway/update-vpc-link.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateVpcLink](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/update-vpc-link.html)를 참조하세요.