libZSservicesZSamazonka-redshiftZSamazonka-redshift
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Redshift.RestoreTableFromClusterSnapshot

Description

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.

Synopsis

Creating a Request

data RestoreTableFromClusterSnapshot Source #

See: newRestoreTableFromClusterSnapshot smart constructor.

Constructors

RestoreTableFromClusterSnapshot' 

Fields

  • targetSchemaName :: Maybe Text

    The name of the schema to restore the table to.

  • enableCaseSensitiveIdentifier :: Maybe Bool

    Indicates whether name identifiers for database, schema, and table are case sensitive. If true, the names are case sensitive. If false (default), the names are not case sensitive.

  • targetDatabaseName :: Maybe Text

    The name of the database to restore the table to.

  • sourceSchemaName :: Maybe Text

    The name of the source schema that contains the table to restore from. If you do not specify a SourceSchemaName value, the default is public.

  • clusterIdentifier :: Text

    The identifier of the Amazon Redshift cluster to restore the table to.

  • snapshotIdentifier :: Text

    The identifier of the snapshot to restore the table from. This snapshot must have been created from the Amazon Redshift cluster specified by the ClusterIdentifier parameter.

  • sourceDatabaseName :: Text

    The name of the source database that contains the table to restore from.

  • sourceTableName :: Text

    The name of the source table to restore from.

  • newTableName' :: Text

    The name of the table to create as a result of the current request.

Instances

Instances details
Eq RestoreTableFromClusterSnapshot Source # 
Instance details

Defined in Amazonka.Redshift.RestoreTableFromClusterSnapshot

Read RestoreTableFromClusterSnapshot Source # 
Instance details

Defined in Amazonka.Redshift.RestoreTableFromClusterSnapshot

Show RestoreTableFromClusterSnapshot Source # 
Instance details

Defined in Amazonka.Redshift.RestoreTableFromClusterSnapshot

Generic RestoreTableFromClusterSnapshot Source # 
Instance details

Defined in Amazonka.Redshift.RestoreTableFromClusterSnapshot

Associated Types

type Rep RestoreTableFromClusterSnapshot :: Type -> Type #

NFData RestoreTableFromClusterSnapshot Source # 
Instance details

Defined in Amazonka.Redshift.RestoreTableFromClusterSnapshot

Hashable RestoreTableFromClusterSnapshot Source # 
Instance details

Defined in Amazonka.Redshift.RestoreTableFromClusterSnapshot

AWSRequest RestoreTableFromClusterSnapshot Source # 
Instance details

Defined in Amazonka.Redshift.RestoreTableFromClusterSnapshot

ToHeaders RestoreTableFromClusterSnapshot Source # 
Instance details

Defined in Amazonka.Redshift.RestoreTableFromClusterSnapshot

ToPath RestoreTableFromClusterSnapshot Source # 
Instance details

Defined in Amazonka.Redshift.RestoreTableFromClusterSnapshot

ToQuery RestoreTableFromClusterSnapshot Source # 
Instance details

Defined in Amazonka.Redshift.RestoreTableFromClusterSnapshot

type Rep RestoreTableFromClusterSnapshot Source # 
Instance details

Defined in Amazonka.Redshift.RestoreTableFromClusterSnapshot

type Rep RestoreTableFromClusterSnapshot = D1 ('MetaData "RestoreTableFromClusterSnapshot" "Amazonka.Redshift.RestoreTableFromClusterSnapshot" "libZSservicesZSamazonka-redshiftZSamazonka-redshift" 'False) (C1 ('MetaCons "RestoreTableFromClusterSnapshot'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "targetSchemaName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "enableCaseSensitiveIdentifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "targetDatabaseName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "sourceSchemaName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "clusterIdentifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "snapshotIdentifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "sourceDatabaseName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "sourceTableName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "newTableName'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))))
type AWSResponse RestoreTableFromClusterSnapshot Source # 
Instance details

Defined in Amazonka.Redshift.RestoreTableFromClusterSnapshot

newRestoreTableFromClusterSnapshot Source #

Create a value of RestoreTableFromClusterSnapshot with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:targetSchemaName:RestoreTableFromClusterSnapshot', restoreTableFromClusterSnapshot_targetSchemaName - The name of the schema to restore the table to.

$sel:enableCaseSensitiveIdentifier:RestoreTableFromClusterSnapshot', restoreTableFromClusterSnapshot_enableCaseSensitiveIdentifier - Indicates whether name identifiers for database, schema, and table are case sensitive. If true, the names are case sensitive. If false (default), the names are not case sensitive.

$sel:targetDatabaseName:RestoreTableFromClusterSnapshot', restoreTableFromClusterSnapshot_targetDatabaseName - The name of the database to restore the table to.

$sel:sourceSchemaName:RestoreTableFromClusterSnapshot', restoreTableFromClusterSnapshot_sourceSchemaName - The name of the source schema that contains the table to restore from. If you do not specify a SourceSchemaName value, the default is public.

$sel:clusterIdentifier:RestoreTableFromClusterSnapshot', restoreTableFromClusterSnapshot_clusterIdentifier - The identifier of the Amazon Redshift cluster to restore the table to.

$sel:snapshotIdentifier:RestoreTableFromClusterSnapshot', restoreTableFromClusterSnapshot_snapshotIdentifier - The identifier of the snapshot to restore the table from. This snapshot must have been created from the Amazon Redshift cluster specified by the ClusterIdentifier parameter.

$sel:sourceDatabaseName:RestoreTableFromClusterSnapshot', restoreTableFromClusterSnapshot_sourceDatabaseName - The name of the source database that contains the table to restore from.

$sel:sourceTableName:RestoreTableFromClusterSnapshot', restoreTableFromClusterSnapshot_sourceTableName - The name of the source table to restore from.

$sel:newTableName':RestoreTableFromClusterSnapshot', restoreTableFromClusterSnapshot_newTableName - The name of the table to create as a result of the current request.

Request Lenses

restoreTableFromClusterSnapshot_enableCaseSensitiveIdentifier :: Lens' RestoreTableFromClusterSnapshot (Maybe Bool) Source #

Indicates whether name identifiers for database, schema, and table are case sensitive. If true, the names are case sensitive. If false (default), the names are not case sensitive.

restoreTableFromClusterSnapshot_sourceSchemaName :: Lens' RestoreTableFromClusterSnapshot (Maybe Text) Source #

The name of the source schema that contains the table to restore from. If you do not specify a SourceSchemaName value, the default is public.

restoreTableFromClusterSnapshot_clusterIdentifier :: Lens' RestoreTableFromClusterSnapshot Text Source #

The identifier of the Amazon Redshift cluster to restore the table to.

restoreTableFromClusterSnapshot_snapshotIdentifier :: Lens' RestoreTableFromClusterSnapshot Text Source #

The identifier of the snapshot to restore the table from. This snapshot must have been created from the Amazon Redshift cluster specified by the ClusterIdentifier parameter.

restoreTableFromClusterSnapshot_sourceDatabaseName :: Lens' RestoreTableFromClusterSnapshot Text Source #

The name of the source database that contains the table to restore from.

restoreTableFromClusterSnapshot_newTableName :: Lens' RestoreTableFromClusterSnapshot Text Source #

The name of the table to create as a result of the current request.

Destructuring the Response

data RestoreTableFromClusterSnapshotResponse Source #

Constructors

RestoreTableFromClusterSnapshotResponse' 

Fields

Instances

Instances details
Eq RestoreTableFromClusterSnapshotResponse Source # 
Instance details

Defined in Amazonka.Redshift.RestoreTableFromClusterSnapshot

Read RestoreTableFromClusterSnapshotResponse Source # 
Instance details

Defined in Amazonka.Redshift.RestoreTableFromClusterSnapshot

Show RestoreTableFromClusterSnapshotResponse Source # 
Instance details

Defined in Amazonka.Redshift.RestoreTableFromClusterSnapshot

Generic RestoreTableFromClusterSnapshotResponse Source # 
Instance details

Defined in Amazonka.Redshift.RestoreTableFromClusterSnapshot

NFData RestoreTableFromClusterSnapshotResponse Source # 
Instance details

Defined in Amazonka.Redshift.RestoreTableFromClusterSnapshot

type Rep RestoreTableFromClusterSnapshotResponse Source # 
Instance details

Defined in Amazonka.Redshift.RestoreTableFromClusterSnapshot

type Rep RestoreTableFromClusterSnapshotResponse = D1 ('MetaData "RestoreTableFromClusterSnapshotResponse" "Amazonka.Redshift.RestoreTableFromClusterSnapshot" "libZSservicesZSamazonka-redshiftZSamazonka-redshift" 'False) (C1 ('MetaCons "RestoreTableFromClusterSnapshotResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "tableRestoreStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe TableRestoreStatus)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

Response Lenses