Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.machinelearning.model;
 
 
Container for the parameters to the CreateDataSourceFromRDS operation.

Creates a DataSource object from an Amazon Relational Database Service (Amazon RDS). A DataSource references data that can be used to perform CreateMLModel, CreateEvaluation, or CreateBatchPrediction operations.

CreateDataSourceFromRDS is an asynchronous operation. In response to CreateDataSourceFromRDS , Amazon Machine Learning (Amazon ML) immediately returns and sets the DataSource status to PENDING . After the DataSource is created and ready for use, Amazon ML sets the Status parameter to COMPLETED . DataSource in COMPLETED or PENDING status can only be used to perform CreateMLModel, CreateEvaluation, or CreateBatchPrediction operations.

If Amazon ML cannot accept the input source, it sets the Status parameter to FAILED and includes an error message in the Message attribute of the GetDataSource operation response.

 
 public class CreateDataSourceFromRDSRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
A user-supplied ID that uniquely identifies the DataSource. Typically, an Amazon Resource Number (ARN) becomes the ID for a DataSource.

Constraints:
Length: 1 - 64
Pattern: [a-zA-Z0-9_.-]+

 
     private String dataSourceId;

    
A user-supplied name or description of the DataSource.

Constraints:
Length: 0 - 1024
Pattern: .*\S.*|^$

 
     private String dataSourceName;

    
The data specification of an Amazon RDS DataSource:
  • DatabaseInformation -

    • DatabaseName - Name of the Amazon RDS database.
    • InstanceIdentifier - Unique identifier for the Amazon RDS database instance.
  • DatabaseCredentials - AWS Identity and Access Management (IAM) credentials that are used to connect to the Amazon RDS database.

  • ResourceRole - Role (DataPipelineDefaultResourceRole) assumed by an Amazon Elastic Compute Cloud (EC2) instance to carry out the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

  • ServiceRole - Role (DataPipelineDefaultRole) assumed by the AWS Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon Simple Storage Service (S3). For more information, see Role templates for data pipelines.

  • SecurityInfo - Security information to use to access an Amazon RDS instance. You need to set up appropriate ingress rules for the security entity IDs provided to allow access to the Amazon RDS instance. Specify a [SubnetId, SecurityGroupIds] pair for a VPC-based Amazon RDS instance.

  • SelectSqlQuery - Query that is used to retrieve the observation data for the Datasource.

  • S3StagingLocation - Amazon S3 location for staging RDS data. The data retrieved from Amazon RDS using SelectSqlQuery is stored in this location.

  • DataSchemaUri - Amazon S3 location of the DataSchema.

  • DataSchema - A JSON string representing the schema. This is not required if DataSchemaUri is specified.

  • DataRearrangement - A JSON string representing the splitting requirement of a Datasource.

    Sample - "{\"randomSeed\":\"some-random-seed\", \"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"

    private RDSDataSpec rDSData;

    
The role that Amazon ML assumes on behalf of the user to create and activate a data pipeline in the user???s account and copy data (using the SelectSqlQuery) query from Amazon RDS to Amazon S3.

Constraints:
Length: 1 - 100

    private String roleARN;

    
The compute statistics for a DataSource. The statistics are generated from the observation data referenced by a DataSource. Amazon ML uses the statistics internally during an MLModel training. This parameter must be set to true if the DataSource needs to be used for MLModel training.
    private Boolean computeStatistics;

    
A user-supplied ID that uniquely identifies the DataSource. Typically, an Amazon Resource Number (ARN) becomes the ID for a DataSource.

Constraints:
Length: 1 - 64
Pattern: [a-zA-Z0-9_.-]+

Returns:
A user-supplied ID that uniquely identifies the DataSource. Typically, an Amazon Resource Number (ARN) becomes the ID for a DataSource.
    public String getDataSourceId() {
        return ;
    }
    
    
A user-supplied ID that uniquely identifies the DataSource. Typically, an Amazon Resource Number (ARN) becomes the ID for a DataSource.

Constraints:
Length: 1 - 64
Pattern: [a-zA-Z0-9_.-]+

Parameters:
dataSourceId A user-supplied ID that uniquely identifies the DataSource. Typically, an Amazon Resource Number (ARN) becomes the ID for a DataSource.
    public void setDataSourceId(String dataSourceId) {
        this. = dataSourceId;
    }
    
    
A user-supplied ID that uniquely identifies the DataSource. Typically, an Amazon Resource Number (ARN) becomes the ID for a DataSource.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 64
Pattern: [a-zA-Z0-9_.-]+

Parameters:
dataSourceId A user-supplied ID that uniquely identifies the DataSource. Typically, an Amazon Resource Number (ARN) becomes the ID for a DataSource.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateDataSourceFromRDSRequest withDataSourceId(String dataSourceId) {
        this. = dataSourceId;
        return this;
    }

    
A user-supplied name or description of the DataSource.

Constraints:
Length: 0 - 1024
Pattern: .*\S.*|^$

Returns:
A user-supplied name or description of the DataSource.
    public String getDataSourceName() {
        return ;
    }
    
    
A user-supplied name or description of the DataSource.

Constraints:
Length: 0 - 1024
Pattern: .*\S.*|^$

Parameters:
dataSourceName A user-supplied name or description of the DataSource.
    public void setDataSourceName(String dataSourceName) {
        this. = dataSourceName;
    }
    
    
A user-supplied name or description of the DataSource.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 1024
Pattern: .*\S.*|^$

Parameters:
dataSourceName A user-supplied name or description of the DataSource.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateDataSourceFromRDSRequest withDataSourceName(String dataSourceName) {
        this. = dataSourceName;
        return this;
    }

    
The data specification of an Amazon RDS DataSource:
  • DatabaseInformation -

    • DatabaseName - Name of the Amazon RDS database.
    • InstanceIdentifier - Unique identifier for the Amazon RDS database instance.
  • DatabaseCredentials - AWS Identity and Access Management (IAM) credentials that are used to connect to the Amazon RDS database.

  • ResourceRole - Role (DataPipelineDefaultResourceRole) assumed by an Amazon Elastic Compute Cloud (EC2) instance to carry out the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

  • ServiceRole - Role (DataPipelineDefaultRole) assumed by the AWS Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon Simple Storage Service (S3). For more information, see Role templates for data pipelines.

  • SecurityInfo - Security information to use to access an Amazon RDS instance. You need to set up appropriate ingress rules for the security entity IDs provided to allow access to the Amazon RDS instance. Specify a [SubnetId, SecurityGroupIds] pair for a VPC-based Amazon RDS instance.

  • SelectSqlQuery - Query that is used to retrieve the observation data for the Datasource.

  • S3StagingLocation - Amazon S3 location for staging RDS data. The data retrieved from Amazon RDS using SelectSqlQuery is stored in this location.

  • DataSchemaUri - Amazon S3 location of the DataSchema.

  • DataSchema - A JSON string representing the schema. This is not required if DataSchemaUri is specified.

  • DataRearrangement - A JSON string representing the splitting requirement of a Datasource.

    Sample - "{\"randomSeed\":\"some-random-seed\", \"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"

Returns:
The data specification of an Amazon RDS DataSource:
  • DatabaseInformation -

    • DatabaseName - Name of the Amazon RDS database.
    • InstanceIdentifier - Unique identifier for the Amazon RDS database instance.
  • DatabaseCredentials - AWS Identity and Access Management (IAM) credentials that are used to connect to the Amazon RDS database.

  • ResourceRole - Role (DataPipelineDefaultResourceRole) assumed by an Amazon Elastic Compute Cloud (EC2) instance to carry out the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

  • ServiceRole - Role (DataPipelineDefaultRole) assumed by the AWS Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon Simple Storage Service (S3). For more information, see Role templates for data pipelines.

  • SecurityInfo - Security information to use to access an Amazon RDS instance. You need to set up appropriate ingress rules for the security entity IDs provided to allow access to the Amazon RDS instance. Specify a [SubnetId, SecurityGroupIds] pair for a VPC-based Amazon RDS instance.

  • SelectSqlQuery - Query that is used to retrieve the observation data for the Datasource.

  • S3StagingLocation - Amazon S3 location for staging RDS data. The data retrieved from Amazon RDS using SelectSqlQuery is stored in this location.

  • DataSchemaUri - Amazon S3 location of the DataSchema.

  • DataSchema - A JSON string representing the schema. This is not required if DataSchemaUri is specified.

  • DataRearrangement - A JSON string representing the splitting requirement of a Datasource.

    Sample - "{\"randomSeed\":\"some-random-seed\", \"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"

    public RDSDataSpec getRDSData() {
        return ;
    }
    
    
The data specification of an Amazon RDS DataSource:
  • DatabaseInformation -

    • DatabaseName - Name of the Amazon RDS database.
    • InstanceIdentifier - Unique identifier for the Amazon RDS database instance.
  • DatabaseCredentials - AWS Identity and Access Management (IAM) credentials that are used to connect to the Amazon RDS database.

  • ResourceRole - Role (DataPipelineDefaultResourceRole) assumed by an Amazon Elastic Compute Cloud (EC2) instance to carry out the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

  • ServiceRole - Role (DataPipelineDefaultRole) assumed by the AWS Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon Simple Storage Service (S3). For more information, see Role templates for data pipelines.

  • SecurityInfo - Security information to use to access an Amazon RDS instance. You need to set up appropriate ingress rules for the security entity IDs provided to allow access to the Amazon RDS instance. Specify a [SubnetId, SecurityGroupIds] pair for a VPC-based Amazon RDS instance.

  • SelectSqlQuery - Query that is used to retrieve the observation data for the Datasource.

  • S3StagingLocation - Amazon S3 location for staging RDS data. The data retrieved from Amazon RDS using SelectSqlQuery is stored in this location.

  • DataSchemaUri - Amazon S3 location of the DataSchema.

  • DataSchema - A JSON string representing the schema. This is not required if DataSchemaUri is specified.

  • DataRearrangement - A JSON string representing the splitting requirement of a Datasource.

    Sample - "{\"randomSeed\":\"some-random-seed\", \"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"

Parameters:
rDSData The data specification of an Amazon RDS DataSource:
  • DatabaseInformation -

    • DatabaseName - Name of the Amazon RDS database.
    • InstanceIdentifier - Unique identifier for the Amazon RDS database instance.
  • DatabaseCredentials - AWS Identity and Access Management (IAM) credentials that are used to connect to the Amazon RDS database.

  • ResourceRole - Role (DataPipelineDefaultResourceRole) assumed by an Amazon Elastic Compute Cloud (EC2) instance to carry out the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

  • ServiceRole - Role (DataPipelineDefaultRole) assumed by the AWS Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon Simple Storage Service (S3). For more information, see Role templates for data pipelines.

  • SecurityInfo - Security information to use to access an Amazon RDS instance. You need to set up appropriate ingress rules for the security entity IDs provided to allow access to the Amazon RDS instance. Specify a [SubnetId, SecurityGroupIds] pair for a VPC-based Amazon RDS instance.

  • SelectSqlQuery - Query that is used to retrieve the observation data for the Datasource.

  • S3StagingLocation - Amazon S3 location for staging RDS data. The data retrieved from Amazon RDS using SelectSqlQuery is stored in this location.

  • DataSchemaUri - Amazon S3 location of the DataSchema.

  • DataSchema - A JSON string representing the schema. This is not required if DataSchemaUri is specified.

  • DataRearrangement - A JSON string representing the splitting requirement of a Datasource.

    Sample - "{\"randomSeed\":\"some-random-seed\", \"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"

    public void setRDSData(RDSDataSpec rDSData) {
        this. = rDSData;
    }
    
    
The data specification of an Amazon RDS DataSource:
  • DatabaseInformation -

    • DatabaseName - Name of the Amazon RDS database.
    • InstanceIdentifier - Unique identifier for the Amazon RDS database instance.
  • DatabaseCredentials - AWS Identity and Access Management (IAM) credentials that are used to connect to the Amazon RDS database.

  • ResourceRole - Role (DataPipelineDefaultResourceRole) assumed by an Amazon Elastic Compute Cloud (EC2) instance to carry out the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

  • ServiceRole - Role (DataPipelineDefaultRole) assumed by the AWS Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon Simple Storage Service (S3). For more information, see Role templates for data pipelines.

  • SecurityInfo - Security information to use to access an Amazon RDS instance. You need to set up appropriate ingress rules for the security entity IDs provided to allow access to the Amazon RDS instance. Specify a [SubnetId, SecurityGroupIds] pair for a VPC-based Amazon RDS instance.

  • SelectSqlQuery - Query that is used to retrieve the observation data for the Datasource.

  • S3StagingLocation - Amazon S3 location for staging RDS data. The data retrieved from Amazon RDS using SelectSqlQuery is stored in this location.

  • DataSchemaUri - Amazon S3 location of the DataSchema.

  • DataSchema - A JSON string representing the schema. This is not required if DataSchemaUri is specified.

  • DataRearrangement - A JSON string representing the splitting requirement of a Datasource.

    Sample - "{\"randomSeed\":\"some-random-seed\", \"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"

Returns a reference to this object so that method calls can be chained together.

Parameters:
rDSData The data specification of an Amazon RDS DataSource:
  • DatabaseInformation -

    • DatabaseName - Name of the Amazon RDS database.
    • InstanceIdentifier - Unique identifier for the Amazon RDS database instance.
  • DatabaseCredentials - AWS Identity and Access Management (IAM) credentials that are used to connect to the Amazon RDS database.

  • ResourceRole - Role (DataPipelineDefaultResourceRole) assumed by an Amazon Elastic Compute Cloud (EC2) instance to carry out the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

  • ServiceRole - Role (DataPipelineDefaultRole) assumed by the AWS Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon Simple Storage Service (S3). For more information, see Role templates for data pipelines.

  • SecurityInfo - Security information to use to access an Amazon RDS instance. You need to set up appropriate ingress rules for the security entity IDs provided to allow access to the Amazon RDS instance. Specify a [SubnetId, SecurityGroupIds] pair for a VPC-based Amazon RDS instance.

  • SelectSqlQuery - Query that is used to retrieve the observation data for the Datasource.

  • S3StagingLocation - Amazon S3 location for staging RDS data. The data retrieved from Amazon RDS using SelectSqlQuery is stored in this location.

  • DataSchemaUri - Amazon S3 location of the DataSchema.

  • DataSchema - A JSON string representing the schema. This is not required if DataSchemaUri is specified.

  • DataRearrangement - A JSON string representing the splitting requirement of a Datasource.

    Sample - "{\"randomSeed\":\"some-random-seed\", \"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"

Returns:
A reference to this updated object so that method calls can be chained together.
        this. = rDSData;
        return this;
    }

    
The role that Amazon ML assumes on behalf of the user to create and activate a data pipeline in the user???s account and copy data (using the SelectSqlQuery) query from Amazon RDS to Amazon S3.

Constraints:
Length: 1 - 100

Returns:
The role that Amazon ML assumes on behalf of the user to create and activate a data pipeline in the user???s account and copy data (using the SelectSqlQuery) query from Amazon RDS to Amazon S3.

    public String getRoleARN() {
        return ;
    }
    
    
The role that Amazon ML assumes on behalf of the user to create and activate a data pipeline in the user???s account and copy data (using the SelectSqlQuery) query from Amazon RDS to Amazon S3.

Constraints:
Length: 1 - 100

Parameters:
roleARN The role that Amazon ML assumes on behalf of the user to create and activate a data pipeline in the user???s account and copy data (using the SelectSqlQuery) query from Amazon RDS to Amazon S3.

    public void setRoleARN(String roleARN) {
        this. = roleARN;
    }
    
    
The role that Amazon ML assumes on behalf of the user to create and activate a data pipeline in the user???s account and copy data (using the SelectSqlQuery) query from Amazon RDS to Amazon S3.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 100

Parameters:
roleARN The role that Amazon ML assumes on behalf of the user to create and activate a data pipeline in the user???s account and copy data (using the SelectSqlQuery) query from Amazon RDS to Amazon S3.

Returns:
A reference to this updated object so that method calls can be chained together.
        this. = roleARN;
        return this;
    }

    
The compute statistics for a DataSource. The statistics are generated from the observation data referenced by a DataSource. Amazon ML uses the statistics internally during an MLModel training. This parameter must be set to true if the DataSource needs to be used for MLModel training.

Returns:
The compute statistics for a DataSource. The statistics are generated from the observation data referenced by a DataSource. Amazon ML uses the statistics internally during an MLModel training. This parameter must be set to true if the DataSource needs to be used for MLModel training.
    public Boolean isComputeStatistics() {
        return ;
    }
    
    
The compute statistics for a DataSource. The statistics are generated from the observation data referenced by a DataSource. Amazon ML uses the statistics internally during an MLModel training. This parameter must be set to true if the DataSource needs to be used for MLModel training.

Parameters:
computeStatistics The compute statistics for a DataSource. The statistics are generated from the observation data referenced by a DataSource. Amazon ML uses the statistics internally during an MLModel training. This parameter must be set to true if the DataSource needs to be used for MLModel training.
    public void setComputeStatistics(Boolean computeStatistics) {
        this. = computeStatistics;
    }
    
    
The compute statistics for a DataSource. The statistics are generated from the observation data referenced by a DataSource. Amazon ML uses the statistics internally during an MLModel training. This parameter must be set to true if the DataSource needs to be used for MLModel training.

Returns a reference to this object so that method calls can be chained together.

Parameters:
computeStatistics The compute statistics for a DataSource. The statistics are generated from the observation data referenced by a DataSource. Amazon ML uses the statistics internally during an MLModel training. This parameter must be set to true if the DataSource needs to be used for MLModel training.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateDataSourceFromRDSRequest withComputeStatistics(Boolean computeStatistics) {
        this. = computeStatistics;
        return this;
    }

    
The compute statistics for a DataSource. The statistics are generated from the observation data referenced by a DataSource. Amazon ML uses the statistics internally during an MLModel training. This parameter must be set to true if the DataSource needs to be used for MLModel training.

Returns:
The compute statistics for a DataSource. The statistics are generated from the observation data referenced by a DataSource. Amazon ML uses the statistics internally during an MLModel training. This parameter must be set to true if the DataSource needs to be used for MLModel training.
    public Boolean getComputeStatistics() {
        return ;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getDataSourceId() != nullsb.append("DataSourceId: " + getDataSourceId() + ",");
        if (getDataSourceName() != nullsb.append("DataSourceName: " + getDataSourceName() + ",");
        if (getRDSData() != nullsb.append("RDSData: " + getRDSData() + ",");
        if (getRoleARN() != nullsb.append("RoleARN: " + getRoleARN() + ",");
        if (isComputeStatistics() != nullsb.append("ComputeStatistics: " + isComputeStatistics() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getDataSourceId() == null) ? 0 : getDataSourceId().hashCode()); 
        hashCode = prime * hashCode + ((getDataSourceName() == null) ? 0 : getDataSourceName().hashCode()); 
        hashCode = prime * hashCode + ((getRDSData() == null) ? 0 : getRDSData().hashCode()); 
        hashCode = prime * hashCode + ((getRoleARN() == null) ? 0 : getRoleARN().hashCode()); 
        hashCode = prime * hashCode + ((isComputeStatistics() == null) ? 0 : isComputeStatistics().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof CreateDataSourceFromRDSRequest == falsereturn false;
        
        if (other.getDataSourceId() == null ^ this.getDataSourceId() == nullreturn false;
        if (other.getDataSourceId() != null && other.getDataSourceId().equals(this.getDataSourceId()) == falsereturn false
        if (other.getDataSourceName() == null ^ this.getDataSourceName() == nullreturn false;
        if (other.getDataSourceName() != null && other.getDataSourceName().equals(this.getDataSourceName()) == falsereturn false
        if (other.getRDSData() == null ^ this.getRDSData() == nullreturn false;
        if (other.getRDSData() != null && other.getRDSData().equals(this.getRDSData()) == falsereturn false
        if (other.getRoleARN() == null ^ this.getRoleARN() == nullreturn false;
        if (other.getRoleARN() != null && other.getRoleARN().equals(this.getRoleARN()) == falsereturn false
        if (other.isComputeStatistics() == null ^ this.isComputeStatistics() == nullreturn false;
        if (other.isComputeStatistics() != null && other.isComputeStatistics().equals(this.isComputeStatistics()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (CreateDataSourceFromRDSRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X