1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateChangeset`](crate::operation::create_changeset::builders::CreateChangesetFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`client_token(impl Into<String>)`](crate::operation::create_changeset::builders::CreateChangesetFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_changeset::builders::CreateChangesetFluentBuilder::set_client_token):<br>required: **false**<br><p>A token that ensures idempotency. This token expires in 10 minutes.</p><br>
    ///   - [`dataset_id(impl Into<String>)`](crate::operation::create_changeset::builders::CreateChangesetFluentBuilder::dataset_id) / [`set_dataset_id(Option<String>)`](crate::operation::create_changeset::builders::CreateChangesetFluentBuilder::set_dataset_id):<br>required: **true**<br><p>The unique identifier for the FinSpace Dataset where the Changeset will be created.</p><br>
    ///   - [`change_type(ChangeType)`](crate::operation::create_changeset::builders::CreateChangesetFluentBuilder::change_type) / [`set_change_type(Option<ChangeType>)`](crate::operation::create_changeset::builders::CreateChangesetFluentBuilder::set_change_type):<br>required: **true**<br><p>The option to indicate how a Changeset will be applied to a Dataset.</p> <ul>  <li>   <p><code>REPLACE</code> – Changeset will be considered as a replacement to all prior loaded Changesets.</p></li>  <li>   <p><code>APPEND</code> – Changeset will be considered as an addition to the end of all prior loaded Changesets.</p></li>  <li>   <p><code>MODIFY</code> – Changeset is considered as a replacement to a specific prior ingested Changeset.</p></li> </ul><br>
    ///   - [`source_params(impl Into<String>, impl Into<String>)`](crate::operation::create_changeset::builders::CreateChangesetFluentBuilder::source_params) / [`set_source_params(Option<HashMap::<String, String>>)`](crate::operation::create_changeset::builders::CreateChangesetFluentBuilder::set_source_params):<br>required: **true**<br><p>Options that define the location of the data being ingested (<code>s3SourcePath</code>) and the source of the changeset (<code>sourceType</code>).</p> <p>Both <code>s3SourcePath</code> and <code>sourceType</code> are required attributes.</p> <p>Here is an example of how you could specify the <code>sourceParams</code>:</p> <p><code> "sourceParams": { "s3SourcePath": "s3://finspace-landing-us-east-2-bk7gcfvitndqa6ebnvys4d/scratch/wr5hh8pwkpqqkxa4sxrmcw/ingestion/equity.csv", "sourceType": "S3" } </code></p> <p>The S3 path that you specify must allow the FinSpace role access. To do that, you first need to configure the IAM policy on S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/finspace/latest/data-api/fs-using-the-finspace-api.html#access-s3-buckets">Loading data from an Amazon S3 Bucket using the FinSpace API</a> section.</p><br>
    ///   - [`format_params(impl Into<String>, impl Into<String>)`](crate::operation::create_changeset::builders::CreateChangesetFluentBuilder::format_params) / [`set_format_params(Option<HashMap::<String, String>>)`](crate::operation::create_changeset::builders::CreateChangesetFluentBuilder::set_format_params):<br>required: **true**<br><p>Options that define the structure of the source file(s) including the format type (<code>formatType</code>), header row (<code>withHeader</code>), data separation character (<code>separator</code>) and the type of compression (<code>compression</code>).</p> <p><code>formatType</code> is a required attribute and can have the following values:</p> <ul>  <li>   <p><code>PARQUET</code> – Parquet source file format.</p></li>  <li>   <p><code>CSV</code> – CSV source file format.</p></li>  <li>   <p><code>JSON</code> – JSON source file format.</p></li>  <li>   <p><code>XML</code> – XML source file format.</p></li> </ul> <p>Here is an example of how you could specify the <code>formatParams</code>:</p> <p><code> "formatParams": { "formatType": "CSV", "withHeader": "true", "separator": ",", "compression":"None" } </code></p> <p>Note that if you only provide <code>formatType</code> as <code>CSV</code>, the rest of the attributes will automatically default to CSV values as following:</p> <p><code> { "withHeader": "true", "separator": "," } </code></p> <p>For more information about supported file formats, see <a href="https://docs.aws.amazon.com/finspace/latest/userguide/supported-data-types.html">Supported Data Types and File Formats</a> in the FinSpace User Guide.</p><br>
    /// - On success, responds with [`CreateChangesetOutput`](crate::operation::create_changeset::CreateChangesetOutput) with field(s):
    ///   - [`dataset_id(Option<String>)`](crate::operation::create_changeset::CreateChangesetOutput::dataset_id): <p>The unique identifier for the FinSpace Dataset where the Changeset is created.</p>
    ///   - [`changeset_id(Option<String>)`](crate::operation::create_changeset::CreateChangesetOutput::changeset_id): <p>The unique identifier of the Changeset that is created.</p>
    /// - On failure, responds with [`SdkError<CreateChangesetError>`](crate::operation::create_changeset::CreateChangesetError)
    #[deprecated(note = "This method will be discontinued.")]
    pub fn create_changeset(&self) -> crate::operation::create_changeset::builders::CreateChangesetFluentBuilder {
        crate::operation::create_changeset::builders::CreateChangesetFluentBuilder::new(self.handle.clone())
    }
}