CmdID

CmdID / aws / aws apigateway

aws apigateway update-rest-api

Changes information about the specified API. AWS CLI reference

2 examples 2 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

Example 1: To change the name of an API

The following update-rest-api example changes the name of an API.

aws apigateway update-rest-api --rest-api-id 1234123412 --patch-operations op=replace,path=/name,value='New Name'Identify
--rest-api-idThe string identifier of the associated RestApi.
--patch-operationsFor more information about supported patch operations, see Patch Operations.
Its output
{
    "id": "1234123412",
    "name": "New Name",
    "description": "My API description",
    "createdDate": "2022-10-06T15:32:41+00:00",
    "apiKeySource": "HEADER",
    "endpointConfiguration": {
        "types": [
            "EDGE"
        ],
        "ipAddressType": "ipv4"
    },
    "disableExecuteApiEndpoint": false,
    "rootResourceId": "a1b2c3d4e5"
}

Example 2: To change the description of an API

The following update-rest-api example changes the description of an API.

aws apigateway update-rest-api --rest-api-id 1234123412 --patch-operations op=replace,path=/description,value='New Description'Identify
--rest-api-idThe string identifier of the associated RestApi.
--patch-operationsFor more information about supported patch operations, see Patch Operations.
Its output
{
    "id": "1234123412",
    "name": "MyAPI",
    "description": "New Description",
    "createdDate": "2022-10-06T15:32:41+00:00",
    "apiKeySource": "HEADER",
    "endpointConfiguration": {
        "types": [
            "EDGE"
        ],
        "ipAddressType": "ipv4"
    },
    "disableExecuteApiEndpoint": false,
    "rootResourceId": "a1b2c3d4e5"
}

For more information, see Develop REST APIs in API Gateway in the Amazon API Gateway Developer Guide.

Options

2 in the AWS CLI reference
--patch-operationsFor more information about supported patch operations, see Patch Operations.
--rest-api-idThe string identifier of the associated RestApi.