/// <p>Creates a new table from a table in an Amazon Redshift cluster snapshot. You must create the new table within the Amazon Redshift cluster that the snapshot was taken from.</p> <p>You cannot use <code>RestoreTableFromClusterSnapshot</code> to restore a table with the same name as an existing table in an Amazon Redshift cluster. That is, you cannot overwrite an existing table in a cluster with a restored table. If you want to replace your original table with a new, restored table, then rename or drop your original table before you call <code>RestoreTableFromClusterSnapshot</code>. When you have renamed your original table, then you can pass the original name of the table as the <code>NewTableName</code> parameter value in the call to <code>RestoreTableFromClusterSnapshot</code>. This way, you can replace the original table with the table created from the snapshot.</p>
Creates a new table from a table in an Amazon Redshift cluster snapshot. You must create the new table within the Amazon Redshift cluster that the snapshot was taken from. You cannot use RestoreTableFromClusterSnapshot to restore a table with the same name as an existing table in an Amazon Redshift cluster. That is, you cannot overwrite an existing table in a cluster with a restored table. If you want to replace your original table with a new, restored table, then rename or drop your original table before you call RestoreTableFromClusterSnapshot. When you have renamed your original table, then you can pass the original name of the table as the NewTableName parameter value in the call to RestoreTableFromClusterSnapshot. This way, you can replace the original table with the table created from the snapshot.
Creates a new table from a table in an Amazon Redshift cluster snapshot . You must create the new table within the Amazon Redshift cluster that the snapshot was taken from . You cannot use RestoreTableFromClusterSnapshot to restore a table with the same name as an existing table in an Amazon Redshift cluster . That is you cannot overwrite an existing table in a cluster with a restored table . If you want to replace your original table with a new restored table then rename or drop your original table before you call RestoreTableFromClusterSnapshot . When you have renamed your original table then you can pass the original name of the table as the NewTableName parameter value in the call to RestoreTableFromClusterSnapshot . This way you can replace the original table with the table created from the snapshot .
fn restore_table_from_cluster_snapshot(
        &self,
        input: RestoreTableFromClusterSnapshotMessage,
    ) -> RusotoFuture<RestoreTableFromClusterSnapshotResult, RestoreTableFromClusterSnapshotError>
    {
        let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
        let mut params = Params::new();
        params.put("Action", "RestoreTableFromClusterSnapshot");
        params.put("Version", "2012-12-01");
        RestoreTableFromClusterSnapshotMessageSerializer::serialize(&mut params, "", &input);
        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
        request.set_content_type("application/x-www-form-urlencoded".to_owned());
        self.client.sign_and_dispatch(request, |response| {
            if !response.status.is_success() {
                return Box::new(response.buffer().from_err().and_then(|response| {
                    Err(RestoreTableFromClusterSnapshotError::from_response(
                        response,
                    ))
                }));
            }
            Box::new(response.buffer().from_err().and_then(move |response| {
                let result;
                if response.body.is_empty() {
                    result = RestoreTableFromClusterSnapshotResult::default();
                } else {
                    let reader = EventReader::new_with_config(
                        response.body.as_ref(),
                        ParserConfig::new().trim_whitespace(false),
                    );
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = peek_at_name(&mut stack)?;
                    start_element(&actual_tag_name, &mut stack)?;
                    result = RestoreTableFromClusterSnapshotResultDeserializer::deserialize(
                        "RestoreTableFromClusterSnapshotResult",
                        &mut stack,
                    )?;
                    skip_tree(&mut stack);
                    end_element(&actual_tag_name, &mut stack)?;
                }
                // parse non-payload
                Ok(result)
            }))
        })
    }
fn restore_table_from_cluster_snapshot ( & self , input : RestoreTableFromClusterSnapshotMessage , ) -> RusotoFuture < RestoreTableFromClusterSnapshotResult , RestoreTableFromClusterSnapshotError > { let mut request = SignedRequest :: new ( " " , " " , & self . region , " " ) ; let mut params = Params :: new ( ) ; params . put ( " " , " " ) ; params . put ( " " , " " ) ; RestoreTableFromClusterSnapshotMessageSerializer :: serialize ( & mut params , " " , & input ) ; request . set_payload ( Some ( serde_urlencoded :: to_string ( & params ) . unwrap ( ) ) ) ; request . set_content_type ( " " . to_owned ( ) ) ; self . client . sign_and_dispatch ( request , | response | { if ! response . status . is_success ( ) { return Box :: new ( response . buffer ( ) . from_err ( ) . and_then ( | response | { Err ( RestoreTableFromClusterSnapshotError :: from_response ( response , ) ) } ) ) ; } Box :: new ( response . buffer ( ) . from_err ( ) . and_then ( move | response | { let result ; if response . body . is_empty ( ) { result = RestoreTableFromClusterSnapshotResult :: default ( ) ; } else { let reader = EventReader :: new_with_config ( response . body . as_ref ( ) , ParserConfig :: new ( ) . trim_whitespace ( false ) , ) ; let mut stack = XmlResponse :: new ( reader . into_iter ( ) . peekable ( ) ) ; let _start_document = stack . next ( ) ; let actual_tag_name = peek_at_name ( & mut stack ) ? ; start_element ( & actual_tag_name , & mut stack ) ? ; result = RestoreTableFromClusterSnapshotResultDeserializer :: deserialize ( " " , & mut stack , ) ? ; skip_tree ( & mut stack ) ; end_element ( & actual_tag_name , & mut stack ) ? ; } // parse non-payload Ok ( result ) } ) ) } ) }
<p>Creates a new table from a table in an Amazon Redshift cluster snapshot.
<p > Creates a new table from a table in an Amazon Redshift cluster snapshot .
&self
input
RestoreTableFromClusterSnapshotMessage