restore_from_cluster_snapshot
¶
restore_from_cluster_snapshot(
*,
config_overrides: Optional[RedshiftClientConfig] = 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 ranges5431-5455or8191-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:miDefault: 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
MaintenanceTrackvalue 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. IfManageMasterPasswordis 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
ManageMasterPasswordis true. -
ip_address_type(Optional[String], default:None) –The IP address type for the cluster. Possible values are
ipv4anddualstack. -
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:
-
AccessToSnapshotDeniedFault–The owner of the specified snapshot has not authorized your account to access the snapshot.
-
ClusterAlreadyExistsFault–The account already has a cluster with the given identifier.
-
ClusterParameterGroupNotFoundFault–The parameter group name does not refer to an existing parameter group.
-
ClusterQuotaExceededFault–The request would exceed the allowed number of cluster instances for this account. For information about increasing your quota, go to Limits in Amazon Redshift in the Amazon Redshift Cluster Management Guide.
-
ClusterSecurityGroupNotFoundFault–The cluster security group name does not refer to an existing cluster security group.
-
ClusterSnapshotNotFoundFault–The snapshot identifier does not refer to an existing cluster snapshot.
-
ClusterSubnetGroupNotFoundFault–The cluster subnet group name does not refer to an existing cluster subnet group.
-
DependentServiceAccessDeniedFault–A dependent service denied access for the integration.
-
DependentServiceRequestThrottlingFault–The request cannot be completed because a dependent service is throttling requests made by Amazon Redshift on your behalf. Wait and retry the request.
-
DependentServiceUnavailableFault–Your request cannot be completed because a dependent internal service is temporarily unavailable. Wait 30 to 60 seconds and try again.
-
HsmClientCertificateNotFoundFault–There is no Amazon Redshift HSM client certificate with the specified identifier.
-
HsmConfigurationNotFoundFault–There is no Amazon Redshift HSM configuration with the specified identifier.
-
InsufficientClusterCapacityFault–The number of nodes specified exceeds the allotted capacity of the cluster.
-
InvalidClusterSnapshotStateFault–The specified cluster snapshot is not in the
availablestate, or other accounts are authorized to access the snapshot. -
InvalidClusterSubnetGroupStateFault–The cluster subnet group cannot be deleted because it is in use.
-
InvalidClusterTrackFault–The provided cluster track name is not valid.
-
InvalidElasticIpFault–The Elastic IP (EIP) is invalid or cannot be found.
-
InvalidReservedNodeStateFault–Indicates that the Reserved Node being exchanged is not in an active state.
-
InvalidRestoreFault–The restore is invalid.
-
InvalidSubnet–The requested subnet is not valid, or not all of the subnets are in the same VPC.
-
InvalidTagFault–The tag is invalid.
-
InvalidVPCNetworkStateFault–The cluster subnet group does not cover all Availability Zones.
-
Ipv6CidrBlockNotFoundFault–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.
-
LimitExceededFault–The encryption key has exceeded its grant limit in Amazon Web Services KMS.
-
NumberOfNodesPerClusterLimitExceededFault–The operation would exceed the number of nodes allowed for a cluster.
-
NumberOfNodesQuotaExceededFault–The operation would exceed the number of nodes allotted to the account. For information about increasing your quota, go to Limits in Amazon Redshift in the Amazon Redshift Cluster Management Guide.
-
RedshiftIdcApplicationNotExistsFault–The application you attempted to find doesn't exist.
-
ReservedNodeAlreadyExistsFault–User already has a reservation with the given identifier.
-
ReservedNodeAlreadyMigratedFault–Indicates that the reserved node has already been exchanged.
-
ReservedNodeNotFoundFault–The specified reserved compute node not found.
-
ReservedNodeOfferingNotFoundFault–Specified offering does not exist.
-
SnapshotScheduleNotFoundFault–We could not find the specified snapshot schedule.
-
TagLimitExceededFault–You have exceeded the number of tags allowed.
-
UnauthorizedOperation–Your account is not authorized to perform the requested operation.
-
UnsupportedOperationFault–The requested operation isn't supported.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_redshift/_services/redshift.py
10446 10447 10448 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 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 | |