libZSservicesZSamazonka-lex-modelsZSamazonka-lex-models
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.LexModels.StartImport

Description

Starts a job to import a resource to Amazon Lex.

Synopsis

Creating a Request

data StartImport Source #

See: newStartImport smart constructor.

Constructors

StartImport' 

Fields

  • tags :: Maybe [Tag]

    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.

  • payload :: Base64

    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.

  • resourceType :: 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.
  • mergeStrategy :: 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 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.

Instances

Instances details
Eq StartImport Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

Read StartImport Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

Show StartImport Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

Generic StartImport Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

Associated Types

type Rep StartImport :: Type -> Type #

NFData StartImport Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

Methods

rnf :: StartImport -> () #

Hashable StartImport Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

ToJSON StartImport Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

AWSRequest StartImport Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

Associated Types

type AWSResponse StartImport #

ToHeaders StartImport Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

Methods

toHeaders :: StartImport -> [Header] #

ToPath StartImport Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

ToQuery StartImport Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

type Rep StartImport Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

type Rep StartImport = D1 ('MetaData "StartImport" "Amazonka.LexModels.StartImport" "libZSservicesZSamazonka-lex-modelsZSamazonka-lex-models" 'False) (C1 ('MetaCons "StartImport'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag])) :*: S1 ('MetaSel ('Just "payload") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Base64)) :*: (S1 ('MetaSel ('Just "resourceType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ResourceType) :*: S1 ('MetaSel ('Just "mergeStrategy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MergeStrategy))))
type AWSResponse StartImport Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

newStartImport Source #

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 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.

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 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

data StartImportResponse Source #

See: newStartImportResponse smart constructor.

Constructors

StartImportResponse' 

Fields

Instances

Instances details
Eq StartImportResponse Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

Read StartImportResponse Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

Show StartImportResponse Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

Generic StartImportResponse Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

Associated Types

type Rep StartImportResponse :: Type -> Type #

NFData StartImportResponse Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

Methods

rnf :: StartImportResponse -> () #

type Rep StartImportResponse Source # 
Instance details

Defined in Amazonka.LexModels.StartImport

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_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.