| 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 | 
Amazonka.LexModels.StartImport
Description
Starts a job to import a resource to Amazon Lex.
Synopsis
- data StartImport = StartImport' {
- tags :: Maybe [Tag]
 - payload :: Base64
 - resourceType :: ResourceType
 - mergeStrategy :: MergeStrategy
 
 - newStartImport :: ByteString -> ResourceType -> MergeStrategy -> StartImport
 - startImport_tags :: Lens' StartImport (Maybe [Tag])
 - startImport_payload :: Lens' StartImport ByteString
 - startImport_resourceType :: Lens' StartImport ResourceType
 - startImport_mergeStrategy :: Lens' StartImport MergeStrategy
 - data StartImportResponse = StartImportResponse' {}
 - newStartImportResponse :: Int -> StartImportResponse
 - startImportResponse_createdDate :: Lens' StartImportResponse (Maybe UTCTime)
 - startImportResponse_importId :: Lens' StartImportResponse (Maybe Text)
 - startImportResponse_importStatus :: Lens' StartImportResponse (Maybe ImportStatus)
 - startImportResponse_mergeStrategy :: Lens' StartImportResponse (Maybe MergeStrategy)
 - startImportResponse_name :: Lens' StartImportResponse (Maybe Text)
 - startImportResponse_resourceType :: Lens' StartImportResponse (Maybe ResourceType)
 - startImportResponse_tags :: Lens' StartImportResponse (Maybe [Tag])
 - startImportResponse_httpStatus :: Lens' StartImportResponse Int
 
Creating a Request
data StartImport Source #
See: newStartImport smart constructor.
Constructors
| StartImport' | |
Fields 
  | |
Instances
Arguments
| :: ByteString | |
| -> ResourceType | |
| -> MergeStrategy | |
| -> StartImport | 
Create a value of StartImport 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:
StartImport, startImport_tags - A list of tags to add to the imported bot. You can only add tags when
 you import a bot, you can't add tags to an intent or slot type.
$sel:payload:StartImport', startImport_payload - 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.
StartImport, startImport_resourceType - 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.
 
StartImport, startImport_mergeStrategy - 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
failureReasonfield of the response to theGetImportoperation.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.
Request Lenses
startImport_tags :: Lens' StartImport (Maybe [Tag]) Source #
A list of tags to add to the imported bot. You can only add tags when you import a bot, you can't add tags to an intent or slot type.
startImport_payload :: 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.
startImport_resourceType :: 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.
 
startImport_mergeStrategy :: 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
failureReasonfield of the response to theGetImportoperation.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
data StartImportResponse Source #
See: newStartImportResponse smart constructor.
Constructors
| StartImportResponse' | |
Fields 
  | |
Instances
newStartImportResponse Source #
Arguments
| :: Int | |
| -> StartImportResponse | 
Create a value of StartImportResponse 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:
StartImportResponse, startImportResponse_createdDate - A timestamp for the date and time that the import job was requested.
$sel:importId:StartImportResponse', startImportResponse_importId - The identifier for the specific import job.
$sel:importStatus:StartImportResponse', startImportResponse_importStatus - The status of the import job. If the status is FAILED, you can get the
 reason for the failure using the GetImport operation.
StartImport, startImportResponse_mergeStrategy - The action to take when there is a merge conflict.
StartImportResponse, startImportResponse_name - The name given to the import job.
StartImport, startImportResponse_resourceType - The type of resource to import.
StartImport, startImportResponse_tags - A list of tags added to the imported bot.
$sel:httpStatus:StartImportResponse', startImportResponse_httpStatus - The response's http status code.
Response Lenses
startImportResponse_createdDate :: Lens' StartImportResponse (Maybe UTCTime) Source #
A timestamp for the date and time that the import job was requested.
startImportResponse_importId :: Lens' StartImportResponse (Maybe Text) Source #
The identifier for the specific import job.
startImportResponse_importStatus :: 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.
startImportResponse_mergeStrategy :: Lens' StartImportResponse (Maybe MergeStrategy) Source #
The action to take when there is a merge conflict.
startImportResponse_name :: Lens' StartImportResponse (Maybe Text) Source #
The name given to the import job.
startImportResponse_resourceType :: Lens' StartImportResponse (Maybe ResourceType) Source #
The type of resource to import.
startImportResponse_tags :: Lens' StartImportResponse (Maybe [Tag]) Source #
A list of tags added to the imported bot.
startImportResponse_httpStatus :: Lens' StartImportResponse Int Source #
The response's http status code.