Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Creates a unique key that you can distribute to clients who invoke your API.
Synopsis
- data CreateApiKey = CreateApiKey' {}
- newCreateApiKey :: Text -> CreateApiKey
- createApiKey_description :: Lens' CreateApiKey (Maybe Text)
- createApiKey_expires :: Lens' CreateApiKey (Maybe Integer)
- createApiKey_apiId :: Lens' CreateApiKey Text
- data CreateApiKeyResponse = CreateApiKeyResponse' {
- apiKey :: Maybe ApiKey
- httpStatus :: Int
- newCreateApiKeyResponse :: Int -> CreateApiKeyResponse
- createApiKeyResponse_apiKey :: Lens' CreateApiKeyResponse (Maybe ApiKey)
- createApiKeyResponse_httpStatus :: Lens' CreateApiKeyResponse Int
Creating a Request
data CreateApiKey Source #
See: newCreateApiKey
smart constructor.
CreateApiKey' | |
|
Instances
Create a value of CreateApiKey
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
CreateApiKey
, createApiKey_description
- A description of the purpose of the API key.
CreateApiKey
, createApiKey_expires
- From the creation time, the time after which the API key expires. The
date is represented as seconds since the epoch, rounded down to the
nearest hour. The default value for this parameter is 7 days from
creation time. For more information, see .
CreateApiKey
, createApiKey_apiId
- The ID for your GraphQL API.
Request Lenses
createApiKey_description :: Lens' CreateApiKey (Maybe Text) Source #
A description of the purpose of the API key.
createApiKey_expires :: Lens' CreateApiKey (Maybe Integer) Source #
From the creation time, the time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour. The default value for this parameter is 7 days from creation time. For more information, see .
createApiKey_apiId :: Lens' CreateApiKey Text Source #
The ID for your GraphQL API.
Destructuring the Response
data CreateApiKeyResponse Source #
See: newCreateApiKeyResponse
smart constructor.
CreateApiKeyResponse' | |
|
Instances
newCreateApiKeyResponse Source #
Create a value of CreateApiKeyResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:apiKey:CreateApiKeyResponse'
, createApiKeyResponse_apiKey
- The API key.
$sel:httpStatus:CreateApiKeyResponse'
, createApiKeyResponse_httpStatus
- The response's http status code.
Response Lenses
createApiKeyResponse_apiKey :: Lens' CreateApiKeyResponse (Maybe ApiKey) Source #
The API key.
createApiKeyResponse_httpStatus :: Lens' CreateApiKeyResponse Int Source #
The response's http status code.