cURL
curl --request POST \ --url https://api.gcore.com/cloud/v1/faas/keys/{project_id}/{region_id} \ --header 'Authorization: <api-key>' \ --header 'Content-Type: application/json' \ --data '{ "description": "key-description", "expire": "2023-08-22T11:21:00Z", "functions": [ { "name": "function-name", "namespace": "namespace-name" } ], "name": "key-name" }'
{ "created_at": "2023-08-22T11:21:00Z", "description": "key-description", "expire": "2023-08-22T11:21:00Z", "functions": [ { "name": "function-name", "namespace": "namespace-name" } ], "name": "key-name", "secret": "secret-key", "status": "Expired" }
Create a new API key for function authentication. The key can be configured with an expiration time and permissions.
Show child attributes
Was this page helpful?