Skip to main content

ApiKey

Manages an API Gateway Api Key.

Sample code

exports.createResources = () => [
{
type: "ApiKey",
group: "APIGateway",
properties: ({}) => ({
name: "my-key",
}),
},
];

Properties

Used By

Full Examples

List

The api Keys can be filtered with the ApiKey type:

gc l -t ApiKey
Listing resources on 1 provider: aws
✓ aws
✓ Initialising
✓ Listing 1/1
┌──────────────────────────────────────────────────────────────────────┐
│ 1 APIGateway::ApiKey from aws │
├──────────────────────────────────────────────────────────────────────┤
│ name: my-key │
│ managedByUs: Yes │
│ live: │
│ id: nt8ab7856k │
│ name: my-key │
│ enabled: true │
│ createdDate: 2021-11-18T22:49:50.000Z │
│ lastUpdatedDate: 2021-11-18T22:49:50.000Z │
│ stageKeys: [] │
│ tags: │
│ Name: my-key │
│ gc-created-by-provider: aws │
│ gc-managed-by: grucloud │
│ gc-project-name: @grucloud/example-aws-api-gateway-restapi-lamb… │
│ gc-stage: dev │
│ │
└──────────────────────────────────────────────────────────────────────┘


List Summary:
Provider: aws
┌─────────────────────────────────────────────────────────────────────┐
│ aws │
├────────────────────┬────────────────────────────────────────────────┤
│ APIGateway::ApiKey │ my-key │
└────────────────────┴────────────────────────────────────────────────┘
1 resource, 1 type, 1 provider
Command "gc l -t ApiKey" executed in 3s