How do I create a resource on my api gateway through the aws CLI if there is no parent resource?

Viewed 249

The documentation has me really confused:

create-resource
--rest-api-id <value>
--parent-id <value>
--path-part <value>
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
--parent-id (string)

[Required] The parent resource’s identifier.

The create-resource command takes a required parameter of --parent-id, but I have no clue what that's even referring to. If this is a "top-level" resource, there isn't a parent id?

1 Answers

The parent-id is the resource that the gateway lives on. You can find it by calling aws apigateway get-resources --rest-api-id {your api id} --region {region}

Related