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 |
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_resourceType :: Lens' StartImportResponse (Maybe ResourceType)
- startImportResponse_importId :: Lens' StartImportResponse (Maybe Text)
- startImportResponse_createdDate :: Lens' StartImportResponse (Maybe UTCTime)
- startImportResponse_name :: Lens' StartImportResponse (Maybe Text)
- startImportResponse_mergeStrategy :: Lens' StartImportResponse (Maybe MergeStrategy)
- startImportResponse_importStatus :: Lens' StartImportResponse (Maybe ImportStatus)
- startImportResponse_tags :: Lens' StartImportResponse (Maybe [Tag])
- startImportResponse_httpStatus :: Lens' StartImportResponse Int
Creating a Request
data StartImport Source #
See: newStartImport
smart constructor.
StartImport' | |
|
Instances
:: 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:
$sel:tags: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.
$sel:resourceType: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.
$sel:mergeStrategy: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
failureReason
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.
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
failureReason
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.
Destructuring the Response
data StartImportResponse Source #
See: newStartImportResponse
smart constructor.
StartImportResponse' | |
|
Instances
newStartImportResponse Source #
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:
$sel:resourceType:StartImport'
, startImportResponse_resourceType
- The type of resource to import.
$sel:importId:StartImportResponse'
, startImportResponse_importId
- The identifier for the specific import job.
$sel:createdDate:StartImportResponse'
, startImportResponse_createdDate
- A timestamp for the date and time that the import job was requested.
$sel:name:StartImportResponse'
, startImportResponse_name
- The name given to the import job.
$sel:mergeStrategy:StartImport'
, startImportResponse_mergeStrategy
- The action to take when there is a merge conflict.
$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.
$sel:tags: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_resourceType :: Lens' StartImportResponse (Maybe ResourceType) Source #
The type of resource to import.
startImportResponse_importId :: Lens' StartImportResponse (Maybe Text) Source #
The identifier for the specific import job.
startImportResponse_createdDate :: Lens' StartImportResponse (Maybe UTCTime) Source #
A timestamp for the date and time that the import job was requested.
startImportResponse_name :: Lens' StartImportResponse (Maybe Text) Source #
The name given to the import job.
startImportResponse_mergeStrategy :: Lens' StartImportResponse (Maybe MergeStrategy) Source #
The action to take when there is a merge conflict.
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_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.