Copyright | (c) 2013-2018 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 |
Language | Haskell2010 |
Starts a job to import a resource to Amazon Lex.
Synopsis
- startImport :: ByteString -> ResourceType -> MergeStrategy -> StartImport
- data StartImport
- siPayload :: Lens' StartImport ByteString
- siResourceType :: Lens' StartImport ResourceType
- siMergeStrategy :: Lens' StartImport MergeStrategy
- startImportResponse :: Int -> StartImportResponse
- data StartImportResponse
- sirsResourceType :: Lens' StartImportResponse (Maybe ResourceType)
- sirsImportId :: Lens' StartImportResponse (Maybe Text)
- sirsCreatedDate :: Lens' StartImportResponse (Maybe UTCTime)
- sirsName :: Lens' StartImportResponse (Maybe Text)
- sirsMergeStrategy :: Lens' StartImportResponse (Maybe MergeStrategy)
- sirsImportStatus :: Lens' StartImportResponse (Maybe ImportStatus)
- sirsResponseStatus :: Lens' StartImportResponse Int
Creating a Request
Creates a value of StartImport
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
siPayload
- A zip archive in binary format. The archive should contain one file, a JSON file containing the resource to import. The resource should match the type specified in theresourceType
field.-- Note: ThisLens
automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. ThisLens
accepts and returns only raw unencoded data.siResourceType
- Specifies the type of resource to export. Each resource also exports any resources that it depends on. * A bot exports dependent intents. * An intent exports dependent slot types.siMergeStrategy
- Specifies the action that theStartImport
operation should take when there is an existing resource with the same name. * FAIL_ON_CONFLICT - The import operation is stopped on the first conflict between a resource in the import file and an existing resource. The name of the resource causing the conflict is in thefailureReason
field of the response to theGetImport
operation. OVERWRITE_LATEST - The import operation proceeds even if there is a conflict with an existing resource. The $LASTEST version of the existing resource is overwritten with the data from the import file.
data StartImport Source #
See: startImport
smart constructor.
Instances
Request Lenses
siPayload :: Lens' StartImport ByteString Source #
A zip archive in binary format. The archive should contain one file, a JSON file containing the resource to import. The resource should match the type specified in the resourceType
field.-- Note: This Lens
automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This Lens
accepts and returns only raw unencoded data.
siResourceType :: Lens' StartImport ResourceType Source #
Specifies the type of resource to export. Each resource also exports any resources that it depends on. * A bot exports dependent intents. * An intent exports dependent slot types.
siMergeStrategy :: Lens' StartImport MergeStrategy Source #
Specifies the action that the StartImport
operation should take when there is an existing resource with the same name. * FAIL_ON_CONFLICT - The import operation is stopped on the first conflict between a resource in the import file and an existing resource. The name of the resource causing the conflict is in the failureReason
field of the response to the GetImport
operation. OVERWRITE_LATEST - The import operation proceeds even if there is a conflict with an existing resource. The $LASTEST version of the existing resource is overwritten with the data from the import file.
Destructuring the Response
Creates a value of StartImportResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
sirsResourceType
- The type of resource to import.sirsImportId
- The identifier for the specific import job.sirsCreatedDate
- A timestamp for the date and time that the import job was requested.sirsName
- The name given to the import job.sirsMergeStrategy
- The action to take when there is a merge conflict.sirsImportStatus
- The status of the import job. If the status isFAILED
, you can get the reason for the failure using theGetImport
operation.sirsResponseStatus
- -- | The response status code.
data StartImportResponse Source #
See: startImportResponse
smart constructor.
Instances
Response Lenses
sirsResourceType :: Lens' StartImportResponse (Maybe ResourceType) Source #
The type of resource to import.
sirsImportId :: Lens' StartImportResponse (Maybe Text) Source #
The identifier for the specific import job.
sirsCreatedDate :: Lens' StartImportResponse (Maybe UTCTime) Source #
A timestamp for the date and time that the import job was requested.
sirsMergeStrategy :: Lens' StartImportResponse (Maybe MergeStrategy) Source #
The action to take when there is a merge conflict.
sirsImportStatus :: Lens' StartImportResponse (Maybe ImportStatus) Source #
The status of the import job. If the status is FAILED
, you can get the reason for the failure using the GetImport
operation.
sirsResponseStatus :: Lens' StartImportResponse Int Source #
- - | The response status code.