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 |
Get a URL to upload content to a knowledge base. To upload content, first make a PUT request to the returned URL with your file, making sure to include the required headers. Then use CreateContent to finalize the content creation process or UpdateContent to modify an existing resource. You can only upload content to a knowledge base of type CUSTOM.
Synopsis
- data StartContentUpload = StartContentUpload' {}
- newStartContentUpload :: Text -> Text -> StartContentUpload
- startContentUpload_contentType :: Lens' StartContentUpload Text
- startContentUpload_knowledgeBaseId :: Lens' StartContentUpload Text
- data StartContentUploadResponse = StartContentUploadResponse' {}
- newStartContentUploadResponse :: Int -> Text -> Text -> UTCTime -> StartContentUploadResponse
- startContentUploadResponse_httpStatus :: Lens' StartContentUploadResponse Int
- startContentUploadResponse_headersToInclude :: Lens' StartContentUploadResponse (HashMap Text Text)
- startContentUploadResponse_uploadId :: Lens' StartContentUploadResponse Text
- startContentUploadResponse_url :: Lens' StartContentUploadResponse Text
- startContentUploadResponse_urlExpiry :: Lens' StartContentUploadResponse UTCTime
Creating a Request
data StartContentUpload Source #
See: newStartContentUpload
smart constructor.
StartContentUpload' | |
|
Instances
newStartContentUpload Source #
:: Text | |
-> Text | |
-> StartContentUpload |
Create a value of StartContentUpload
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:contentType:StartContentUpload'
, startContentUpload_contentType
- The type of content to upload.
$sel:knowledgeBaseId:StartContentUpload'
, startContentUpload_knowledgeBaseId
- The the identifier of the knowledge base. Can be either the ID or the
ARN. URLs cannot contain the ARN.
Request Lenses
startContentUpload_contentType :: Lens' StartContentUpload Text Source #
The type of content to upload.
startContentUpload_knowledgeBaseId :: Lens' StartContentUpload Text Source #
The the identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.
Destructuring the Response
data StartContentUploadResponse Source #
See: newStartContentUploadResponse
smart constructor.
Instances
newStartContentUploadResponse Source #
:: Int | |
-> Text | |
-> Text | |
-> UTCTime | |
-> StartContentUploadResponse |
Create a value of StartContentUploadResponse
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:httpStatus:StartContentUploadResponse'
, startContentUploadResponse_httpStatus
- The response's http status code.
$sel:headersToInclude:StartContentUploadResponse'
, startContentUploadResponse_headersToInclude
- The headers to include in the upload.
$sel:uploadId:StartContentUploadResponse'
, startContentUploadResponse_uploadId
- The identifier of the upload.
$sel:url:StartContentUploadResponse'
, startContentUploadResponse_url
- The URL of the upload.
$sel:urlExpiry:StartContentUploadResponse'
, startContentUploadResponse_urlExpiry
- The expiration time of the URL as an epoch timestamp.
Response Lenses
startContentUploadResponse_httpStatus :: Lens' StartContentUploadResponse Int Source #
The response's http status code.
startContentUploadResponse_headersToInclude :: Lens' StartContentUploadResponse (HashMap Text Text) Source #
The headers to include in the upload.
startContentUploadResponse_uploadId :: Lens' StartContentUploadResponse Text Source #
The identifier of the upload.
startContentUploadResponse_url :: Lens' StartContentUploadResponse Text Source #
The URL of the upload.
startContentUploadResponse_urlExpiry :: Lens' StartContentUploadResponse UTCTime Source #
The expiration time of the URL as an epoch timestamp.