Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Creates a unique key that you can distribute to clients who are executing your API.
Synopsis
- data CreateApiKey = CreateApiKey' {}
- newCreateApiKey :: Text -> CreateApiKey
- createApiKey_expires :: Lens' CreateApiKey (Maybe Integer)
- createApiKey_description :: Lens' CreateApiKey (Maybe Text)
- 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:
$sel:expires:CreateApiKey'
, createApiKey_expires
- The time from creation 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 .
$sel:description:CreateApiKey'
, createApiKey_description
- A description of the purpose of the API key.
$sel:apiId:CreateApiKey'
, createApiKey_apiId
- The ID for your GraphQL API.
Request Lenses
createApiKey_expires :: Lens' CreateApiKey (Maybe Integer) Source #
The time from creation 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_description :: Lens' CreateApiKey (Maybe Text) Source #
A description of the purpose of the API key.
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.