Skip to content

restore_from_cluster_snapshot async

restore_from_cluster_snapshot(
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    cluster_identifier: Optional[String] = None,
    snapshot_identifier: Optional[String] = None,
    snapshot_arn: Optional[String] = None,
    snapshot_cluster_identifier: Optional[String] = None,
    port: Optional[IntegerOptional] = None,
    availability_zone: Optional[String] = None,
    allow_version_upgrade: Optional[BooleanOptional] = None,
    cluster_subnet_group_name: Optional[String] = None,
    publicly_accessible: Optional[BooleanOptional] = None,
    owner_account: Optional[String] = None,
    hsm_client_certificate_identifier: Optional[String] = None,
    hsm_configuration_identifier: Optional[String] = None,
    elastic_ip: Optional[String] = None,
    cluster_parameter_group_name: Optional[String] = None,
    cluster_security_groups: Optional[ClusterSecurityGroupNameList] = None,
    vpc_security_group_ids: Optional[VpcSecurityGroupIdList] = None,
    preferred_maintenance_window: Optional[String] = None,
    automated_snapshot_retention_period: Optional[IntegerOptional] = None,
    manual_snapshot_retention_period: Optional[IntegerOptional] = None,
    kms_key_id: Optional[String] = None,
    node_type: Optional[String] = None,
    enhanced_vpc_routing: Optional[BooleanOptional] = None,
    additional_info: Optional[String] = None,
    iam_roles: Optional[IamRoleArnList] = None,
    maintenance_track_name: Optional[String] = None,
    snapshot_schedule_identifier: Optional[String] = None,
    number_of_nodes: Optional[IntegerOptional] = None,
    availability_zone_relocation: Optional[BooleanOptional] = None,
    aqua_configuration_status: Optional[AquaConfigurationStatus] = None,
    default_iam_role_arn: Optional[String] = None,
    reserved_node_id: Optional[String] = None,
    target_reserved_node_offering_id: Optional[String] = None,
    encrypted: Optional[BooleanOptional] = None,
    manage_master_password: Optional[BooleanOptional] = None,
    master_password_secret_kms_key_id: Optional[String] = None,
    ip_address_type: Optional[String] = None,
    multi_az: Optional[BooleanOptional] = None,
    catalog_name: Optional[CatalogNameString] = None,
    redshift_idc_application_arn: Optional[String] = None,
) -> RestoreFromClusterSnapshotResult

Creates a new cluster from a snapshot. By default, Amazon Redshift creates the resulting cluster with the same configuration as the original cluster from which the snapshot was created, except that the new cluster is created with the default cluster security and parameter groups. After Amazon Redshift creates the cluster, you can use the ModifyCluster API to associate a different security group and different parameter group with the restored cluster. If you are using a DS node type, you can also choose to change to another DS node type of the same size during restore.

If you restore a cluster into a VPC, you must provide a cluster subnet group where you want the cluster restored.

VPC Block Public Access (BPA) enables you to block resources in VPCs and subnets that you own in a Region from reaching or being reached from the internet through internet gateways and egress-only internet gateways. If a subnet group for a provisioned cluster is in an account with VPC BPA turned on, the following capabilities are blocked:

  • Creating a public cluster

  • Restoring a public cluster

  • Modifying a private cluster to be public

  • Adding a subnet with VPC BPA turned on to the subnet group when there's at least one public cluster within the group

For more information about VPC BPA, see Block public access to VPCs and subnets in the Amazon VPC User Guide.

For more information about working with snapshots, go to Amazon Redshift Snapshots in the Amazon Redshift Cluster Management Guide.

Parameters:

  • cluster_identifier (Optional[String], default: None ) –

    The identifier of the cluster that will be created from restoring the snapshot.

    Constraints:

    • Must contain from 1 to 63 alphanumeric characters or hyphens.

    • Alphabetic characters must be lowercase.

    • First character must be a letter.

    • Cannot end with a hyphen or contain two consecutive hyphens.

    • Must be unique for all clusters within an Amazon Web Services account.

  • snapshot_identifier (Optional[String], default: None ) –

    The name of the snapshot from which to create the new cluster. This parameter isn't case sensitive. You must specify this parameter or snapshotArn, but not both.

    Example: my-snapshot-id

  • snapshot_arn (Optional[String], default: None ) –

    The Amazon Resource Name (ARN) of the snapshot associated with the message to restore from a cluster. You must specify this parameter or snapshotIdentifier, but not both.

  • snapshot_cluster_identifier (Optional[String], default: None ) –

    The name of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.

  • port (Optional[IntegerOptional], default: None ) –

    The port number on which the cluster accepts connections.

    Default: The same port as the original cluster.

    Valid values: For clusters with DC2 nodes, must be within the range 1150-65535. For clusters with RG or RA3 nodes, must be within the ranges 5431-5455 or 8191-8215.

  • availability_zone (Optional[String], default: None ) –

    The Amazon EC2 Availability Zone in which to restore the cluster.

    Default: A random, system-chosen Availability Zone.

    Example: us-east-2a

  • allow_version_upgrade (Optional[BooleanOptional], default: None ) –

    If true, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.

    Default: true

  • cluster_subnet_group_name (Optional[String], default: None ) –

    The name of the subnet group where you want to cluster restored.

    A snapshot of cluster in VPC can be restored only in VPC. Therefore, you must provide subnet group name where you want the cluster restored.

  • publicly_accessible (Optional[BooleanOptional], default: None ) –

    If true, the cluster can be accessed from a public network.

    Default: false

  • owner_account (Optional[String], default: None ) –

    The Amazon Web Services account used to create or copy the snapshot. Required if you are restoring a snapshot you do not own, optional if you own the snapshot.

  • hsm_client_certificate_identifier (Optional[String], default: None ) –

    Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.

  • hsm_configuration_identifier (Optional[String], default: None ) –

    Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.

  • elastic_ip (Optional[String], default: None ) –

    The Elastic IP (EIP) address for the cluster. Don't specify the Elastic IP address for a publicly accessible cluster with availability zone relocation turned on.

  • cluster_parameter_group_name (Optional[String], default: None ) –

    The name of the parameter group to be associated with this cluster.

    Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups.

    Constraints:

    • Must be 1 to 255 alphanumeric characters or hyphens.

    • First character must be a letter.

    • Cannot end with a hyphen or contain two consecutive hyphens.

  • cluster_security_groups (Optional[ClusterSecurityGroupNameList], default: None ) –

    A list of security groups to be associated with this cluster.

    Default: The default cluster security group for Amazon Redshift.

    Cluster security groups only apply to clusters outside of VPCs.

  • vpc_security_group_ids (Optional[VpcSecurityGroupIdList], default: None ) –

    A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.

    Default: The default VPC security group is associated with the cluster.

    VPC security groups only apply to clusters in VPCs.

  • preferred_maintenance_window (Optional[String], default: None ) –

    The weekly time range (in UTC) during which automated cluster maintenance can occur.

    Format: ddd:hh24:mi-ddd:hh24:mi

    Default: The value selected for the cluster from which the snapshot was taken. For more information about the time blocks for each region, see Maintenance Windows in Amazon Redshift Cluster Management Guide.

    Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun

    Constraints: Minimum 30-minute window.

  • automated_snapshot_retention_period (Optional[IntegerOptional], default: None ) –

    The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot.

    You can't disable automated snapshots for RG or RA3 node types. Set the automated retention period from 1-35 days.

    Default: The value selected for the cluster from which the snapshot was taken.

    Constraints: Must be a value from 0 to 35.

  • manual_snapshot_retention_period (Optional[IntegerOptional], default: None ) –

    The default number of days to retain a manual snapshot. If the value is -1, the snapshot is retained indefinitely. This setting doesn't change the retention period of existing snapshots.

    The value must be either -1 or an integer between 1 and 3,653.

  • kms_key_id (Optional[String], default: None ) –

    The Key Management Service (KMS) key ID of the encryption key that encrypts data in the cluster restored from a shared snapshot. You can also provide the key ID when you restore from an unencrypted snapshot to an encrypted cluster in the same account. Additionally, you can specify a new KMS key ID when you restore from an encrypted snapshot in the same account in order to change it. In that case, the restored cluster is encrypted with the new KMS key ID.

  • node_type (Optional[String], default: None ) –

    The node type that the restored cluster will be provisioned with.

    If you have a DC instance type, you must restore into that same instance type and size. In other words, you can only restore a dc2.large node type into another dc2 type. For more information about node types, see About Clusters and Nodes in the Amazon Redshift Cluster Management Guide.

  • enhanced_vpc_routing (Optional[BooleanOptional], default: None ) –

    An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.

    If this option is true, enhanced VPC routing is enabled.

    Default: false

  • additional_info (Optional[String], default: None ) –

    Reserved.

  • iam_roles (Optional[IamRoleArnList], default: None ) –

    A list of Identity and Access Management (IAM) roles that can be used by the cluster to access other Amazon Web Services services. You must supply the IAM roles in their Amazon Resource Name (ARN) format.

    The maximum number of IAM roles that you can associate is subject to a quota. For more information, go to Quotas and limits in the Amazon Redshift Cluster Management Guide.

  • maintenance_track_name (Optional[String], default: None ) –

    The name of the maintenance track for the restored cluster. When you take a snapshot, the snapshot inherits the MaintenanceTrack value from the cluster. The snapshot might be on a different track than the cluster that was the source for the snapshot. For example, suppose that you take a snapshot of a cluster that is on the current track and then change the cluster to be on the trailing track. In this case, the snapshot and the source cluster are on different tracks.

  • snapshot_schedule_identifier (Optional[String], default: None ) –

    A unique identifier for the snapshot schedule.

  • number_of_nodes (Optional[IntegerOptional], default: None ) –

    The number of nodes specified when provisioning the restored cluster.

  • availability_zone_relocation (Optional[BooleanOptional], default: None ) –

    The option to enable relocation for an Amazon Redshift cluster between Availability Zones after the cluster is restored.

  • aqua_configuration_status (Optional[AquaConfigurationStatus], default: None ) –

    This parameter is retired. It does not set the AQUA configuration status. Amazon Redshift automatically determines whether to use AQUA (Advanced Query Accelerator).

  • default_iam_role_arn (Optional[String], default: None ) –

    The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was last modified while it was restored from a snapshot.

  • reserved_node_id (Optional[String], default: None ) –

    The identifier of the target reserved node offering.

  • target_reserved_node_offering_id (Optional[String], default: None ) –

    The identifier of the target reserved node offering.

  • encrypted (Optional[BooleanOptional], default: None ) –

    Enables support for restoring an unencrypted snapshot to a cluster encrypted with Key Management Service (KMS) and a customer managed key.

  • manage_master_password (Optional[BooleanOptional], default: None ) –

    If true, Amazon Redshift uses Secrets Manager to manage the restored cluster's admin credentials. If ManageMasterPassword is false or not set, Amazon Redshift uses the admin credentials the cluster had at the time the snapshot was taken.

  • master_password_secret_kms_key_id (Optional[String], default: None ) –

    The ID of the Key Management Service (KMS) key used to encrypt and store the cluster's admin credentials secret. You can only use this parameter if ManageMasterPassword is true.

  • ip_address_type (Optional[String], default: None ) –

    The IP address type for the cluster. Possible values are ipv4 and dualstack.

  • multi_az (Optional[BooleanOptional], default: None ) –

    If true, the snapshot will be restored to a cluster deployed in two Availability Zones.

  • catalog_name (Optional[CatalogNameString], default: None ) –

    The name of the Glue Data Catalog that will be associated with the cluster enabled with Amazon Redshift federated permissions.

    Constraints:

    • Must contain at least one lowercase letter.

    • Can only contain lowercase letters (a-z), numbers (0-9), underscores (_), and hyphens (-).

    Pattern: ^[a-z0-9_-]*[a-z]+[a-z0-9_-]*$

    Example: my-catalog_01

  • redshift_idc_application_arn (Optional[String], default: None ) –

    The Amazon Resource Name (ARN) of the IAM Identity Center application used for enabling Amazon Web Services IAM Identity Center trusted identity propagation on a cluster enabled with Amazon Redshift federated permissions.

Raises:

Source code in docs_src/capo_redshift/_services/async_redshift.py
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
async def restore_from_cluster_snapshot(
    self,
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    cluster_identifier: Optional["capo_redshift.types.string.String"] = None,
    snapshot_identifier: Optional["capo_redshift.types.string.String"] = None,
    snapshot_arn: Optional["capo_redshift.types.string.String"] = None,
    snapshot_cluster_identifier: Optional[
        "capo_redshift.types.string.String"
    ] = None,
    port: Optional["capo_redshift.types.integer_optional.IntegerOptional"] = None,
    availability_zone: Optional["capo_redshift.types.string.String"] = None,
    allow_version_upgrade: Optional[
        "capo_redshift.types.boolean_optional.BooleanOptional"
    ] = None,
    cluster_subnet_group_name: Optional["capo_redshift.types.string.String"] = None,
    publicly_accessible: Optional[
        "capo_redshift.types.boolean_optional.BooleanOptional"
    ] = None,
    owner_account: Optional["capo_redshift.types.string.String"] = None,
    hsm_client_certificate_identifier: Optional[
        "capo_redshift.types.string.String"
    ] = None,
    hsm_configuration_identifier: Optional[
        "capo_redshift.types.string.String"
    ] = None,
    elastic_ip: Optional["capo_redshift.types.string.String"] = None,
    cluster_parameter_group_name: Optional[
        "capo_redshift.types.string.String"
    ] = None,
    cluster_security_groups: Optional[
        "capo_redshift.types.cluster_security_group_name_list.ClusterSecurityGroupNameList"
    ] = None,
    vpc_security_group_ids: Optional[
        "capo_redshift.types.vpc_security_group_id_list.VpcSecurityGroupIdList"
    ] = None,
    preferred_maintenance_window: Optional[
        "capo_redshift.types.string.String"
    ] = None,
    automated_snapshot_retention_period: Optional[
        "capo_redshift.types.integer_optional.IntegerOptional"
    ] = None,
    manual_snapshot_retention_period: Optional[
        "capo_redshift.types.integer_optional.IntegerOptional"
    ] = None,
    kms_key_id: Optional["capo_redshift.types.string.String"] = None,
    node_type: Optional["capo_redshift.types.string.String"] = None,
    enhanced_vpc_routing: Optional[
        "capo_redshift.types.boolean_optional.BooleanOptional"
    ] = None,
    additional_info: Optional["capo_redshift.types.string.String"] = None,
    iam_roles: Optional[
        "capo_redshift.types.iam_role_arn_list.IamRoleArnList"
    ] = None,
    maintenance_track_name: Optional["capo_redshift.types.string.String"] = None,
    snapshot_schedule_identifier: Optional[
        "capo_redshift.types.string.String"
    ] = None,
    number_of_nodes: Optional[
        "capo_redshift.types.integer_optional.IntegerOptional"
    ] = None,
    availability_zone_relocation: Optional[
        "capo_redshift.types.boolean_optional.BooleanOptional"
    ] = None,
    aqua_configuration_status: Optional[
        "capo_redshift.types.aqua_configuration_status.AquaConfigurationStatus"
    ] = None,
    default_iam_role_arn: Optional["capo_redshift.types.string.String"] = None,
    reserved_node_id: Optional["capo_redshift.types.string.String"] = None,
    target_reserved_node_offering_id: Optional[
        "capo_redshift.types.string.String"
    ] = None,
    encrypted: Optional[
        "capo_redshift.types.boolean_optional.BooleanOptional"
    ] = None,
    manage_master_password: Optional[
        "capo_redshift.types.boolean_optional.BooleanOptional"
    ] = None,
    master_password_secret_kms_key_id: Optional[
        "capo_redshift.types.string.String"
    ] = None,
    ip_address_type: Optional["capo_redshift.types.string.String"] = None,
    multi_az: Optional[
        "capo_redshift.types.boolean_optional.BooleanOptional"
    ] = None,
    catalog_name: Optional[
        "capo_redshift.types.catalog_name_string.CatalogNameString"
    ] = None,
    redshift_idc_application_arn: Optional[
        "capo_redshift.types.string.String"
    ] = None,
) -> "capo_redshift.types.restore_from_cluster_snapshot_result.RestoreFromClusterSnapshotResult":
    """<p>Creates a new cluster from a snapshot. By default, Amazon Redshift creates the resulting cluster with the same configuration as the original cluster from which the snapshot was created, except that the new cluster is created with the default cluster security and parameter groups. After Amazon Redshift creates the cluster, you can use the <a>ModifyCluster</a> API to associate a different security group and different parameter group with the restored cluster. If you are using a DS node type, you can also choose to change to another DS node type of the same size during restore.</p> <p>If you restore a cluster into a VPC, you must provide a cluster subnet group where you want the cluster restored.</p> <p>VPC Block Public Access (BPA) enables you to block resources in VPCs and subnets that you own in a Region from reaching or being reached from the internet through internet gateways and egress-only internet gateways. If a subnet group for a provisioned cluster is in an account with VPC BPA turned on, the following capabilities are blocked:</p> <ul> <li> <p>Creating a public cluster</p> </li> <li> <p>Restoring a public cluster</p> </li> <li> <p>Modifying a private cluster to be public</p> </li> <li> <p>Adding a subnet with VPC BPA turned on to the subnet group when there's at least one public cluster within the group</p> </li> </ul> <p>For more information about VPC BPA, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/security-vpc-bpa.html">Block public access to VPCs and subnets</a> in the <i>Amazon VPC User Guide</i>.</p> <p> For more information about working with snapshots, go to <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html">Amazon Redshift Snapshots</a> in the <i>Amazon Redshift Cluster Management Guide</i>.</p>

    Args:
        cluster_identifier: <p>The identifier of the cluster that will be created from restoring the snapshot.</p> <p>Constraints:</p> <ul> <li> <p>Must contain from 1 to 63 alphanumeric characters or hyphens.</p> </li> <li> <p>Alphabetic characters must be lowercase.</p> </li> <li> <p>First character must be a letter.</p> </li> <li> <p>Cannot end with a hyphen or contain two consecutive hyphens.</p> </li> <li> <p>Must be unique for all clusters within an Amazon Web Services account.</p> </li> </ul>
        snapshot_identifier: <p>The name of the snapshot from which to create the new cluster. This parameter isn't case sensitive. You must specify this parameter or <code>snapshotArn</code>, but not both.</p> <p>Example: <code>my-snapshot-id</code> </p>
        snapshot_arn: <p>The Amazon Resource Name (ARN) of the snapshot associated with the message to restore from a cluster. You must specify this parameter or <code>snapshotIdentifier</code>, but not both.</p>
        snapshot_cluster_identifier: <p>The name of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.</p>
        port: <p>The port number on which the cluster accepts connections.</p> <p>Default: The same port as the original cluster.</p> <p>Valid values: For clusters with DC2 nodes, must be within the range <code>1150</code>-<code>65535</code>. For clusters with RG or RA3 nodes, must be within the ranges <code>5431</code>-<code>5455</code> or <code>8191</code>-<code>8215</code>.</p>
        availability_zone: <p>The Amazon EC2 Availability Zone in which to restore the cluster.</p> <p>Default: A random, system-chosen Availability Zone.</p> <p>Example: <code>us-east-2a</code> </p>
        allow_version_upgrade: <p>If <code>true</code>, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster. </p> <p>Default: <code>true</code> </p>
        cluster_subnet_group_name: <p>The name of the subnet group where you want to cluster restored.</p> <p>A snapshot of cluster in VPC can be restored only in VPC. Therefore, you must provide subnet group name where you want the cluster restored.</p>
        publicly_accessible: <p>If <code>true</code>, the cluster can be accessed from a public network. </p> <p>Default: false</p>
        owner_account: <p>The Amazon Web Services account used to create or copy the snapshot. Required if you are restoring a snapshot you do not own, optional if you own the snapshot.</p>
        hsm_client_certificate_identifier: <p>Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.</p>
        hsm_configuration_identifier: <p>Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.</p>
        elastic_ip: <p>The Elastic IP (EIP) address for the cluster. Don't specify the Elastic IP address for a publicly accessible cluster with availability zone relocation turned on.</p>
        cluster_parameter_group_name: <p>The name of the parameter group to be associated with this cluster.</p> <p>Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html">Working with Amazon Redshift Parameter Groups</a>.</p> <p>Constraints:</p> <ul> <li> <p>Must be 1 to 255 alphanumeric characters or hyphens.</p> </li> <li> <p>First character must be a letter.</p> </li> <li> <p>Cannot end with a hyphen or contain two consecutive hyphens.</p> </li> </ul>
        cluster_security_groups: <p>A list of security groups to be associated with this cluster.</p> <p>Default: The default cluster security group for Amazon Redshift.</p> <p>Cluster security groups only apply to clusters outside of VPCs.</p>
        vpc_security_group_ids: <p>A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.</p> <p>Default: The default VPC security group is associated with the cluster.</p> <p>VPC security groups only apply to clusters in VPCs.</p>
        preferred_maintenance_window: <p>The weekly time range (in UTC) during which automated cluster maintenance can occur.</p> <p> Format: <code>ddd:hh24:mi-ddd:hh24:mi</code> </p> <p> Default: The value selected for the cluster from which the snapshot was taken. For more information about the time blocks for each region, see <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-maintenance-windows">Maintenance Windows</a> in Amazon Redshift Cluster Management Guide. </p> <p>Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun</p> <p>Constraints: Minimum 30-minute window.</p>
        automated_snapshot_retention_period: <p>The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with <a>CreateClusterSnapshot</a>. </p> <p>You can't disable automated snapshots for RG or RA3 node types. Set the automated retention period from 1-35 days.</p> <p>Default: The value selected for the cluster from which the snapshot was taken.</p> <p>Constraints: Must be a value from 0 to 35.</p>
        manual_snapshot_retention_period: <p>The default number of days to retain a manual snapshot. If the value is -1, the snapshot is retained indefinitely. This setting doesn't change the retention period of existing snapshots.</p> <p>The value must be either -1 or an integer between 1 and 3,653.</p>
        kms_key_id: <p>The Key Management Service (KMS) key ID of the encryption key that encrypts data in the cluster restored from a shared snapshot. You can also provide the key ID when you restore from an unencrypted snapshot to an encrypted cluster in the same account. Additionally, you can specify a new KMS key ID when you restore from an encrypted snapshot in the same account in order to change it. In that case, the restored cluster is encrypted with the new KMS key ID.</p>
        node_type: <p>The node type that the restored cluster will be provisioned with.</p> <p>If you have a DC instance type, you must restore into that same instance type and size. In other words, you can only restore a dc2.large node type into another dc2 type. For more information about node types, see <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-about-clusters-and-nodes"> About Clusters and Nodes</a> in the <i>Amazon Redshift Cluster Management Guide</i>. </p>
        enhanced_vpc_routing: <p>An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html">Enhanced VPC Routing</a> in the Amazon Redshift Cluster Management Guide.</p> <p>If this option is <code>true</code>, enhanced VPC routing is enabled. </p> <p>Default: false</p>
        additional_info: <p>Reserved.</p>
        iam_roles: <p>A list of Identity and Access Management (IAM) roles that can be used by the cluster to access other Amazon Web Services services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. </p> <p>The maximum number of IAM roles that you can associate is subject to a quota. For more information, go to <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html">Quotas and limits</a> in the <i>Amazon Redshift Cluster Management Guide</i>.</p>
        maintenance_track_name: <p>The name of the maintenance track for the restored cluster. When you take a snapshot, the snapshot inherits the <code>MaintenanceTrack</code> value from the cluster. The snapshot might be on a different track than the cluster that was the source for the snapshot. For example, suppose that you take a snapshot of a cluster that is on the current track and then change the cluster to be on the trailing track. In this case, the snapshot and the source cluster are on different tracks.</p>
        snapshot_schedule_identifier: <p>A unique identifier for the snapshot schedule.</p>
        number_of_nodes: <p>The number of nodes specified when provisioning the restored cluster.</p>
        availability_zone_relocation: <p>The option to enable relocation for an Amazon Redshift cluster between Availability Zones after the cluster is restored.</p>
        aqua_configuration_status: <p>This parameter is retired. It does not set the AQUA configuration status. Amazon Redshift automatically determines whether to use AQUA (Advanced Query Accelerator).</p>
        default_iam_role_arn: <p>The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was last modified while it was restored from a snapshot.</p>
        reserved_node_id: <p>The identifier of the target reserved node offering.</p>
        target_reserved_node_offering_id: <p>The identifier of the target reserved node offering.</p>
        encrypted: <p>Enables support for restoring an unencrypted snapshot to a cluster encrypted with Key Management Service (KMS) and a customer managed key.</p>
        manage_master_password: <p>If <code>true</code>, Amazon Redshift uses Secrets Manager to manage the restored cluster's admin credentials. If <code>ManageMasterPassword</code> is false or not set, Amazon Redshift uses the admin credentials the cluster had at the time the snapshot was taken.</p>
        master_password_secret_kms_key_id: <p>The ID of the Key Management Service (KMS) key used to encrypt and store the cluster's admin credentials secret. You can only use this parameter if <code>ManageMasterPassword</code> is true.</p>
        ip_address_type: <p>The IP address type for the cluster. Possible values are <code>ipv4</code> and <code>dualstack</code>.</p>
        multi_az: <p>If true, the snapshot will be restored to a cluster deployed in two Availability Zones.</p>
        catalog_name: <p>The name of the Glue Data Catalog that will be associated with the cluster enabled with Amazon Redshift federated permissions.</p> <p>Constraints:</p> <ul> <li> <p>Must contain at least one lowercase letter.</p> </li> <li> <p>Can only contain lowercase letters (a-z), numbers (0-9), underscores (_), and hyphens (-).</p> </li> </ul> <p>Pattern: <code>^[a-z0-9_-]*[a-z]+[a-z0-9_-]*$</code> </p> <p>Example: <code>my-catalog_01</code> </p>
        redshift_idc_application_arn: <p>The Amazon Resource Name (ARN) of the IAM Identity Center application used for enabling Amazon Web Services IAM Identity Center trusted identity propagation on a cluster enabled with Amazon Redshift federated permissions.</p>

    Raises:
        capo_redshift.errors.access_to_snapshot_denied_fault.AccessToSnapshotDeniedFault: <p>The owner of the specified snapshot has not authorized your account to access the snapshot.</p>
        capo_redshift.errors.cluster_already_exists_fault.ClusterAlreadyExistsFault: <p>The account already has a cluster with the given identifier.</p>
        capo_redshift.errors.cluster_parameter_group_not_found_fault.ClusterParameterGroupNotFoundFault: <p>The parameter group name does not refer to an existing parameter group.</p>
        capo_redshift.errors.cluster_quota_exceeded_fault.ClusterQuotaExceededFault: <p>The request would exceed the allowed number of cluster instances for this account. For information about increasing your quota, go to <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html">Limits in Amazon Redshift</a> in the <i>Amazon Redshift Cluster Management Guide</i>. </p>
        capo_redshift.errors.cluster_security_group_not_found_fault.ClusterSecurityGroupNotFoundFault: <p>The cluster security group name does not refer to an existing cluster security group.</p>
        capo_redshift.errors.cluster_snapshot_not_found_fault.ClusterSnapshotNotFoundFault: <p>The snapshot identifier does not refer to an existing cluster snapshot.</p>
        capo_redshift.errors.cluster_subnet_group_not_found_fault.ClusterSubnetGroupNotFoundFault: <p>The cluster subnet group name does not refer to an existing cluster subnet group.</p>
        capo_redshift.errors.dependent_service_access_denied_fault.DependentServiceAccessDeniedFault: <p>A dependent service denied access for the integration.</p>
        capo_redshift.errors.dependent_service_request_throttling_fault.DependentServiceRequestThrottlingFault: <p>The request cannot be completed because a dependent service is throttling requests made by Amazon Redshift on your behalf. Wait and retry the request.</p>
        capo_redshift.errors.dependent_service_unavailable_fault.DependentServiceUnavailableFault: <p>Your request cannot be completed because a dependent internal service is temporarily unavailable. Wait 30 to 60 seconds and try again.</p>
        capo_redshift.errors.hsm_client_certificate_not_found_fault.HsmClientCertificateNotFoundFault: <p>There is no Amazon Redshift HSM client certificate with the specified identifier.</p>
        capo_redshift.errors.hsm_configuration_not_found_fault.HsmConfigurationNotFoundFault: <p>There is no Amazon Redshift HSM configuration with the specified identifier.</p>
        capo_redshift.errors.insufficient_cluster_capacity_fault.InsufficientClusterCapacityFault: <p>The number of nodes specified exceeds the allotted capacity of the cluster.</p>
        capo_redshift.errors.invalid_cluster_snapshot_state_fault.InvalidClusterSnapshotStateFault: <p>The specified cluster snapshot is not in the <code>available</code> state, or other accounts are authorized to access the snapshot. </p>
        capo_redshift.errors.invalid_cluster_subnet_group_state_fault.InvalidClusterSubnetGroupStateFault: <p>The cluster subnet group cannot be deleted because it is in use.</p>
        capo_redshift.errors.invalid_cluster_track_fault.InvalidClusterTrackFault: <p>The provided cluster track name is not valid.</p>
        capo_redshift.errors.invalid_elastic_ip_fault.InvalidElasticIpFault: <p>The Elastic IP (EIP) is invalid or cannot be found.</p>
        capo_redshift.errors.invalid_reserved_node_state_fault.InvalidReservedNodeStateFault: <p>Indicates that the Reserved Node being exchanged is not in an active state.</p>
        capo_redshift.errors.invalid_restore_fault.InvalidRestoreFault: <p>The restore is invalid.</p>
        capo_redshift.errors.invalid_subnet.InvalidSubnet: <p>The requested subnet is not valid, or not all of the subnets are in the same VPC.</p>
        capo_redshift.errors.invalid_tag_fault.InvalidTagFault: <p>The tag is invalid.</p>
        capo_redshift.errors.invalid_vpc_network_state_fault.InvalidVPCNetworkStateFault: <p>The cluster subnet group does not cover all Availability Zones.</p>
        capo_redshift.errors.ipv6_cidr_block_not_found_fault.Ipv6CidrBlockNotFoundFault: <p>There are no subnets in your VPC with associated IPv6 CIDR blocks. To use dual-stack mode, associate an IPv6 CIDR block with each subnet in your VPC.</p>
        capo_redshift.errors.limit_exceeded_fault.LimitExceededFault: <p>The encryption key has exceeded its grant limit in Amazon Web Services KMS.</p>
        capo_redshift.errors.number_of_nodes_per_cluster_limit_exceeded_fault.NumberOfNodesPerClusterLimitExceededFault: <p>The operation would exceed the number of nodes allowed for a cluster.</p>
        capo_redshift.errors.number_of_nodes_quota_exceeded_fault.NumberOfNodesQuotaExceededFault: <p>The operation would exceed the number of nodes allotted to the account. For information about increasing your quota, go to <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html">Limits in Amazon Redshift</a> in the <i>Amazon Redshift Cluster Management Guide</i>. </p>
        capo_redshift.errors.redshift_idc_application_not_exists_fault.RedshiftIdcApplicationNotExistsFault: <p>The application you attempted to find doesn't exist.</p>
        capo_redshift.errors.reserved_node_already_exists_fault.ReservedNodeAlreadyExistsFault: <p>User already has a reservation with the given identifier.</p>
        capo_redshift.errors.reserved_node_already_migrated_fault.ReservedNodeAlreadyMigratedFault: <p>Indicates that the reserved node has already been exchanged.</p>
        capo_redshift.errors.reserved_node_not_found_fault.ReservedNodeNotFoundFault: <p>The specified reserved compute node not found.</p>
        capo_redshift.errors.reserved_node_offering_not_found_fault.ReservedNodeOfferingNotFoundFault: <p>Specified offering does not exist.</p>
        capo_redshift.errors.snapshot_schedule_not_found_fault.SnapshotScheduleNotFoundFault: <p>We could not find the specified snapshot schedule. </p>
        capo_redshift.errors.tag_limit_exceeded_fault.TagLimitExceededFault: <p>You have exceeded the number of tags allowed.</p>
        capo_redshift.errors.unauthorized_operation.UnauthorizedOperation: <p>Your account is not authorized to perform the requested operation.</p>
        capo_redshift.errors.unsupported_operation_fault.UnsupportedOperationFault: <p>The requested operation isn't supported.</p>
        capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_redshift.types.restore_from_cluster_snapshot_message.RestoreFromClusterSnapshotMessage]",
    ) -> AsyncOperationResponse[
        "capo_redshift.types.restore_from_cluster_snapshot_result.RestoreFromClusterSnapshotResult"
    ]:
        import capo_redshift._operations.redshift_service_version20121201.restore_from_cluster_snapshot

        (
            output,
            http_response,
        ) = await capo_redshift._operations.redshift_service_version20121201.restore_from_cluster_snapshot.async_restore_from_cluster_snapshot(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_redshift.types.restore_from_cluster_snapshot_result.RestoreFromClusterSnapshotResult",
    ) -> dict[str, Any]:
        import capo_redshift.types.restore_from_cluster_snapshot_result

        return capo_redshift.types.restore_from_cluster_snapshot_result.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "RestoreFromClusterSnapshot", redact_output=_redact_output
        ),
    )
    input_: capo_redshift.types.restore_from_cluster_snapshot_message.RestoreFromClusterSnapshotMessage = {}
    if cluster_identifier is not None:
        input_["cluster_identifier"] = cluster_identifier
    if snapshot_identifier is not None:
        input_["snapshot_identifier"] = snapshot_identifier
    if snapshot_arn is not None:
        input_["snapshot_arn"] = snapshot_arn
    if snapshot_cluster_identifier is not None:
        input_["snapshot_cluster_identifier"] = snapshot_cluster_identifier
    if port is not None:
        input_["port"] = port
    if availability_zone is not None:
        input_["availability_zone"] = availability_zone
    if allow_version_upgrade is not None:
        input_["allow_version_upgrade"] = allow_version_upgrade
    if cluster_subnet_group_name is not None:
        input_["cluster_subnet_group_name"] = cluster_subnet_group_name
    if publicly_accessible is not None:
        input_["publicly_accessible"] = publicly_accessible
    if owner_account is not None:
        input_["owner_account"] = owner_account
    if hsm_client_certificate_identifier is not None:
        input_["hsm_client_certificate_identifier"] = (
            hsm_client_certificate_identifier
        )
    if hsm_configuration_identifier is not None:
        input_["hsm_configuration_identifier"] = hsm_configuration_identifier
    if elastic_ip is not None:
        input_["elastic_ip"] = elastic_ip
    if cluster_parameter_group_name is not None:
        input_["cluster_parameter_group_name"] = cluster_parameter_group_name
    if cluster_security_groups is not None:
        input_["cluster_security_groups"] = cluster_security_groups
    if vpc_security_group_ids is not None:
        input_["vpc_security_group_ids"] = vpc_security_group_ids
    if preferred_maintenance_window is not None:
        input_["preferred_maintenance_window"] = preferred_maintenance_window
    if automated_snapshot_retention_period is not None:
        input_["automated_snapshot_retention_period"] = (
            automated_snapshot_retention_period
        )
    if manual_snapshot_retention_period is not None:
        input_["manual_snapshot_retention_period"] = (
            manual_snapshot_retention_period
        )
    if kms_key_id is not None:
        input_["kms_key_id"] = kms_key_id
    if node_type is not None:
        input_["node_type"] = node_type
    if enhanced_vpc_routing is not None:
        input_["enhanced_vpc_routing"] = enhanced_vpc_routing
    if additional_info is not None:
        input_["additional_info"] = additional_info
    if iam_roles is not None:
        input_["iam_roles"] = iam_roles
    if maintenance_track_name is not None:
        input_["maintenance_track_name"] = maintenance_track_name
    if snapshot_schedule_identifier is not None:
        input_["snapshot_schedule_identifier"] = snapshot_schedule_identifier
    if number_of_nodes is not None:
        input_["number_of_nodes"] = number_of_nodes
    if availability_zone_relocation is not None:
        input_["availability_zone_relocation"] = availability_zone_relocation
    if aqua_configuration_status is not None:
        input_["aqua_configuration_status"] = aqua_configuration_status
    if default_iam_role_arn is not None:
        input_["default_iam_role_arn"] = default_iam_role_arn
    if reserved_node_id is not None:
        input_["reserved_node_id"] = reserved_node_id
    if target_reserved_node_offering_id is not None:
        input_["target_reserved_node_offering_id"] = (
            target_reserved_node_offering_id
        )
    if encrypted is not None:
        input_["encrypted"] = encrypted
    if manage_master_password is not None:
        input_["manage_master_password"] = manage_master_password
    if master_password_secret_kms_key_id is not None:
        input_["master_password_secret_kms_key_id"] = (
            master_password_secret_kms_key_id
        )
    if ip_address_type is not None:
        input_["ip_address_type"] = ip_address_type
    if multi_az is not None:
        input_["multi_az"] = multi_az
    if catalog_name is not None:
        input_["catalog_name"] = catalog_name
    if redshift_idc_application_arn is not None:
        input_["redshift_idc_application_arn"] = redshift_idc_application_arn

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output