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 |
Gets one or more models. Gets all models for the Amazon Web Services account if no model type and no model id provided. Gets all models for the Amazon Web Services account and model type, if the model type is specified but model id is not provided. Gets a specific model if (model type, model id) tuple is specified.
This is a paginated API. If you provide a null maxResults
, this action
retrieves a maximum of 10 records per page. If you provide a
maxResults
, the value must be between 1 and 10. To get the next page
results, provide the pagination token from the response as part of your
request. A null pagination token fetches the records from the beginning.
Synopsis
- data GetModels = GetModels' {}
- newGetModels :: GetModels
- getModels_modelType :: Lens' GetModels (Maybe ModelTypeEnum)
- getModels_modelId :: Lens' GetModels (Maybe Text)
- getModels_nextToken :: Lens' GetModels (Maybe Text)
- getModels_maxResults :: Lens' GetModels (Maybe Natural)
- data GetModelsResponse = GetModelsResponse' {}
- newGetModelsResponse :: Int -> GetModelsResponse
- getModelsResponse_models :: Lens' GetModelsResponse (Maybe [Model])
- getModelsResponse_nextToken :: Lens' GetModelsResponse (Maybe Text)
- getModelsResponse_httpStatus :: Lens' GetModelsResponse Int
Creating a Request
See: newGetModels
smart constructor.
Instances
newGetModels :: GetModels Source #
Create a value of GetModels
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:modelType:GetModels'
, getModels_modelType
- The model type.
$sel:modelId:GetModels'
, getModels_modelId
- The model ID.
$sel:nextToken:GetModels'
, getModels_nextToken
- The next token for the subsequent request.
$sel:maxResults:GetModels'
, getModels_maxResults
- The maximum number of objects to return for the request.
Request Lenses
getModels_modelType :: Lens' GetModels (Maybe ModelTypeEnum) Source #
The model type.
getModels_nextToken :: Lens' GetModels (Maybe Text) Source #
The next token for the subsequent request.
getModels_maxResults :: Lens' GetModels (Maybe Natural) Source #
The maximum number of objects to return for the request.
Destructuring the Response
data GetModelsResponse Source #
See: newGetModelsResponse
smart constructor.
Instances
Create a value of GetModelsResponse
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:models:GetModelsResponse'
, getModelsResponse_models
- The array of models.
$sel:nextToken:GetModels'
, getModelsResponse_nextToken
- The next page token to be used in subsequent requests.
$sel:httpStatus:GetModelsResponse'
, getModelsResponse_httpStatus
- The response's http status code.
Response Lenses
getModelsResponse_models :: Lens' GetModelsResponse (Maybe [Model]) Source #
The array of models.
getModelsResponse_nextToken :: Lens' GetModelsResponse (Maybe Text) Source #
The next page token to be used in subsequent requests.
getModelsResponse_httpStatus :: Lens' GetModelsResponse Int Source #
The response's http status code.