aws_sdk_machinelearning/client/create_data_source_from_redshift.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 [`CreateDataSourceFromRedshift`](crate::operation::create_data_source_from_redshift::builders::CreateDataSourceFromRedshiftFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`data_source_id(impl Into<String>)`](crate::operation::create_data_source_from_redshift::builders::CreateDataSourceFromRedshiftFluentBuilder::data_source_id) / [`set_data_source_id(Option<String>)`](crate::operation::create_data_source_from_redshift::builders::CreateDataSourceFromRedshiftFluentBuilder::set_data_source_id):<br>required: **true**<br><p>A user-supplied ID that uniquely identifies the <code>DataSource</code>.</p><br>
7 /// - [`data_source_name(impl Into<String>)`](crate::operation::create_data_source_from_redshift::builders::CreateDataSourceFromRedshiftFluentBuilder::data_source_name) / [`set_data_source_name(Option<String>)`](crate::operation::create_data_source_from_redshift::builders::CreateDataSourceFromRedshiftFluentBuilder::set_data_source_name):<br>required: **false**<br><p>A user-supplied name or description of the <code>DataSource</code>.</p><br>
8 /// - [`data_spec(RedshiftDataSpec)`](crate::operation::create_data_source_from_redshift::builders::CreateDataSourceFromRedshiftFluentBuilder::data_spec) / [`set_data_spec(Option<RedshiftDataSpec>)`](crate::operation::create_data_source_from_redshift::builders::CreateDataSourceFromRedshiftFluentBuilder::set_data_spec):<br>required: **true**<br><p>The data specification of an Amazon Redshift <code>DataSource</code>:</p> <ul> <li> <p>DatabaseInformation -</p> <ul> <li> <p><code>DatabaseName</code> - The name of the Amazon Redshift database.</p></li> <li> <p><code> ClusterIdentifier</code> - The unique ID for the Amazon Redshift cluster.</p></li> </ul></li> <li> <p>DatabaseCredentials - The AWS Identity and Access Management (IAM) credentials that are used to connect to the Amazon Redshift database.</p></li> <li> <p>SelectSqlQuery - The query that is used to retrieve the observation data for the <code>Datasource</code>.</p></li> <li> <p>S3StagingLocation - The Amazon Simple Storage Service (Amazon S3) location for staging Amazon Redshift data. The data retrieved from Amazon Redshift using the <code>SelectSqlQuery</code> query is stored in this location.</p></li> <li> <p>DataSchemaUri - The Amazon S3 location of the <code>DataSchema</code>.</p></li> <li> <p>DataSchema - A JSON string representing the schema. This is not required if <code>DataSchemaUri</code> is specified.</p></li> <li> <p>DataRearrangement - A JSON string that represents the splitting and rearrangement requirements for the <code>DataSource</code>.</p> <p>Sample - <code> "{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"</code></p></li> </ul><br>
9 /// - [`role_arn(impl Into<String>)`](crate::operation::create_data_source_from_redshift::builders::CreateDataSourceFromRedshiftFluentBuilder::role_arn) / [`set_role_arn(Option<String>)`](crate::operation::create_data_source_from_redshift::builders::CreateDataSourceFromRedshiftFluentBuilder::set_role_arn):<br>required: **true**<br><p>A fully specified role Amazon Resource Name (ARN). Amazon ML assumes the role on behalf of the user to create the following:</p> <ul> <li> <p>A security group to allow Amazon ML to execute the <code>SelectSqlQuery</code> query on an Amazon Redshift cluster</p></li> <li> <p>An Amazon S3 bucket policy to grant Amazon ML read/write permissions on the <code>S3StagingLocation</code></p></li> </ul><br>
10 /// - [`compute_statistics(bool)`](crate::operation::create_data_source_from_redshift::builders::CreateDataSourceFromRedshiftFluentBuilder::compute_statistics) / [`set_compute_statistics(Option<bool>)`](crate::operation::create_data_source_from_redshift::builders::CreateDataSourceFromRedshiftFluentBuilder::set_compute_statistics):<br>required: **false**<br><p>The compute statistics for a <code>DataSource</code>. The statistics are generated from the observation data referenced by a <code>DataSource</code>. Amazon ML uses the statistics internally during <code>MLModel</code> training. This parameter must be set to <code>true</code> if the <code>DataSource</code> needs to be used for <code>MLModel</code> training.</p><br>
11 /// - On success, responds with [`CreateDataSourceFromRedshiftOutput`](crate::operation::create_data_source_from_redshift::CreateDataSourceFromRedshiftOutput) with field(s):
12 /// - [`data_source_id(Option<String>)`](crate::operation::create_data_source_from_redshift::CreateDataSourceFromRedshiftOutput::data_source_id): <p>A user-supplied ID that uniquely identifies the datasource. This value should be identical to the value of the <code>DataSourceID</code> in the request.</p>
13 /// - On failure, responds with [`SdkError<CreateDataSourceFromRedshiftError>`](crate::operation::create_data_source_from_redshift::CreateDataSourceFromRedshiftError)
14 pub fn create_data_source_from_redshift(
15 &self,
16 ) -> crate::operation::create_data_source_from_redshift::builders::CreateDataSourceFromRedshiftFluentBuilder {
17 crate::operation::create_data_source_from_redshift::builders::CreateDataSourceFromRedshiftFluentBuilder::new(self.handle.clone())
18 }
19}