describe_cluster_snapshots
¶
describe_cluster_snapshots(
*,
config_overrides: Optional[RedshiftClientConfig] = None,
cluster_identifier: Optional[String] = None,
snapshot_identifier: Optional[String] = None,
snapshot_arn: Optional[String] = None,
snapshot_type: Optional[String] = None,
start_time: Optional[TStamp] = None,
end_time: Optional[TStamp] = None,
max_records: Optional[IntegerOptional] = None,
marker: Optional[String] = None,
owner_account: Optional[String] = None,
tag_keys: Optional[TagKeyList] = None,
tag_values: Optional[TagValueList] = None,
cluster_exists: Optional[BooleanOptional] = None,
sorting_entities: Optional[SnapshotSortingEntityList] = None,
) -> SnapshotMessage
Returns one or more snapshot objects, which contain metadata about your cluster snapshots. By default, this operation returns information about all snapshots of all clusters that are owned by your Amazon Web Services account. No information is returned for snapshots owned by inactive Amazon Web Services accounts.
If you specify both tag keys and tag values in the same request, Amazon Redshift returns all snapshots that match any combination of the specified keys and values. For example, if you have owner and environment for tag keys, and admin and test for tag values, all snapshots that have any combination of those values are returned. Only snapshots that you own are returned in the response; shared snapshots are not returned with the tag key and tag value request parameters.
If both tag keys and values are omitted from the request, snapshots are returned regardless of whether they have tag keys or values associated with them.
Parameters:
-
cluster_identifier(Optional[String], default:None) –The identifier of the cluster which generated the requested snapshots.
-
snapshot_identifier(Optional[String], default:None) –The snapshot identifier of the snapshot about which to return information.
-
snapshot_arn(Optional[String], default:None) –The Amazon Resource Name (ARN) of the snapshot associated with the message to describe cluster snapshots.
-
snapshot_type(Optional[String], default:None) –The type of snapshots for which you are requesting information. By default, snapshots of all types are returned.
Valid Values:
automated|manual -
start_time(Optional[TStamp], default:None) –A value that requests only snapshots created at or after the specified time. The time value is specified in ISO 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia page.
Example:
2012-07-16T18:00:00Z -
end_time(Optional[TStamp], default:None) –A time value that requests only snapshots created at or before the specified time. The time value is specified in ISO 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia page.
Example:
2012-07-16T18:00:00Z -
max_records(Optional[IntegerOptional], default:None) –The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified
MaxRecordsvalue, a value is returned in amarkerfield of the response. You can retrieve the next set of records by retrying the command with the returned marker value.Default:
100Constraints: minimum 20, maximum 100.
-
marker(Optional[String], default:None) –An optional parameter that specifies the starting point to return a set of response records. When the results of a DescribeClusterSnapshots request exceed the value specified in
MaxRecords, Amazon Web Services returns a value in theMarkerfield of the response. You can retrieve the next set of response records by providing the returned marker value in theMarkerparameter and retrying the request. -
owner_account(Optional[String], default:None) –The Amazon Web Services account used to create or copy the snapshot. Use this field to filter the results to snapshots owned by a particular account. To describe snapshots you own, either specify your Amazon Web Services account, or do not specify the parameter.
-
tag_keys(Optional[TagKeyList], default:None) –A tag key or keys for which you want to return all matching cluster snapshots that are associated with the specified key or keys. For example, suppose that you have snapshots that are tagged with keys called
ownerandenvironment. If you specify both of these tag keys in the request, Amazon Redshift returns a response with the snapshots that have either or both of these tag keys associated with them. -
tag_values(Optional[TagValueList], default:None) –A tag value or values for which you want to return all matching cluster snapshots that are associated with the specified tag value or values. For example, suppose that you have snapshots that are tagged with values called
adminandtest. If you specify both of these tag values in the request, Amazon Redshift returns a response with the snapshots that have either or both of these tag values associated with them. -
cluster_exists(Optional[BooleanOptional], default:None) –A value that indicates whether to return snapshots only for an existing cluster. You can perform table-level restore only by using a snapshot of an existing cluster, that is, a cluster that has not been deleted. Values for this parameter work as follows:
-
If
ClusterExistsis set totrue,ClusterIdentifieris required. -
If
ClusterExistsis set tofalseandClusterIdentifierisn't specified, all snapshots associated with deleted clusters (orphaned snapshots) are returned. -
If
ClusterExistsis set tofalseandClusterIdentifieris specified for a deleted cluster, snapshots associated with that cluster are returned. -
If
ClusterExistsis set tofalseandClusterIdentifieris specified for an existing cluster, no snapshots are returned.
-
-
sorting_entities(Optional[SnapshotSortingEntityList], default:None) –
Raises:
-
ClusterNotFoundFault–The
ClusterIdentifierparameter does not refer to an existing cluster. -
ClusterSnapshotNotFoundFault–The snapshot identifier does not refer to an existing cluster snapshot.
-
InvalidTagFault–The tag is invalid.
-
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
4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 | |