aws_sdk_lexmodelbuilding/client/
start_import.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`StartImport`](crate::operation::start_import::builders::StartImportFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`payload(Blob)`](crate::operation::start_import::builders::StartImportFluentBuilder::payload) / [`set_payload(Option<Blob>)`](crate::operation::start_import::builders::StartImportFluentBuilder::set_payload):<br>required: **true**<br><p>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 <code>resourceType</code> field.</p><br>
7    ///   - [`resource_type(ResourceType)`](crate::operation::start_import::builders::StartImportFluentBuilder::resource_type) / [`set_resource_type(Option<ResourceType>)`](crate::operation::start_import::builders::StartImportFluentBuilder::set_resource_type):<br>required: **true**<br><p>Specifies the type of resource to export. Each resource also exports any resources that it depends on.</p> <ul>  <li>   <p>A bot exports dependent intents.</p></li>  <li>   <p>An intent exports dependent slot types.</p></li> </ul><br>
8    ///   - [`merge_strategy(MergeStrategy)`](crate::operation::start_import::builders::StartImportFluentBuilder::merge_strategy) / [`set_merge_strategy(Option<MergeStrategy>)`](crate::operation::start_import::builders::StartImportFluentBuilder::set_merge_strategy):<br>required: **true**<br><p>Specifies the action that the <code>StartImport</code> operation should take when there is an existing resource with the same name.</p> <ul>  <li>   <p>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 <code>failureReason</code> field of the response to the <code>GetImport</code> operation.</p>   <p>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.</p></li> </ul><br>
9    ///   - [`tags(Tag)`](crate::operation::start_import::builders::StartImportFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::start_import::builders::StartImportFluentBuilder::set_tags):<br>required: **false**<br><p>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.</p><br>
10    /// - On success, responds with [`StartImportOutput`](crate::operation::start_import::StartImportOutput) with field(s):
11    ///   - [`name(Option<String>)`](crate::operation::start_import::StartImportOutput::name): <p>The name given to the import job.</p>
12    ///   - [`resource_type(Option<ResourceType>)`](crate::operation::start_import::StartImportOutput::resource_type): <p>The type of resource to import.</p>
13    ///   - [`merge_strategy(Option<MergeStrategy>)`](crate::operation::start_import::StartImportOutput::merge_strategy): <p>The action to take when there is a merge conflict.</p>
14    ///   - [`import_id(Option<String>)`](crate::operation::start_import::StartImportOutput::import_id): <p>The identifier for the specific import job.</p>
15    ///   - [`import_status(Option<ImportStatus>)`](crate::operation::start_import::StartImportOutput::import_status): <p>The status of the import job. If the status is <code>FAILED</code>, you can get the reason for the failure using the <code>GetImport</code> operation.</p>
16    ///   - [`tags(Option<Vec::<Tag>>)`](crate::operation::start_import::StartImportOutput::tags): <p>A list of tags added to the imported bot.</p>
17    ///   - [`created_date(Option<DateTime>)`](crate::operation::start_import::StartImportOutput::created_date): <p>A timestamp for the date and time that the import job was requested.</p>
18    /// - On failure, responds with [`SdkError<StartImportError>`](crate::operation::start_import::StartImportError)
19    pub fn start_import(&self) -> crate::operation::start_import::builders::StartImportFluentBuilder {
20        crate::operation::start_import::builders::StartImportFluentBuilder::new(self.handle.clone())
21    }
22}