/AWS1/IF_RDS=>DESCRIBEDBSNAPSHOTS()¶
About DescribeDBSnapshots¶
Returns information about DB snapshots. This API action supports pagination.
Method Signature¶
METHODS /AWS1/IF_RDS~DESCRIBEDBSNAPSHOTS
IMPORTING
!IV_DBINSTANCEIDENTIFIER TYPE /AWS1/RDSSTRING OPTIONAL
!IV_DBSNAPSHOTIDENTIFIER TYPE /AWS1/RDSSTRING OPTIONAL
!IV_SNAPSHOTTYPE TYPE /AWS1/RDSSTRING OPTIONAL
!IT_FILTERS TYPE /AWS1/CL_RDSFILTER=>TT_FILTERLIST OPTIONAL
!IV_MAXRECORDS TYPE /AWS1/RDSINTEGEROPTIONAL OPTIONAL
!IV_MARKER TYPE /AWS1/RDSSTRING OPTIONAL
!IV_INCLUDESHARED TYPE /AWS1/RDSBOOLEAN OPTIONAL
!IV_INCLUDEPUBLIC TYPE /AWS1/RDSBOOLEAN OPTIONAL
!IV_DBIRESOURCEID TYPE /AWS1/RDSSTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_rdsdbsnapshotmessage
RAISING
/AWS1/CX_RDSDBSNAPNOTFNDFAULT
/AWS1/CX_RDSCLIENTEXC
/AWS1/CX_RDSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_dbinstanceidentifier TYPE /AWS1/RDSSTRING /AWS1/RDSSTRING¶
The ID of the DB instance to retrieve the list of DB snapshots for. This parameter isn't case-sensitive.
Constraints:
If supplied, must match the identifier of an existing DBInstance.
iv_dbsnapshotidentifier TYPE /AWS1/RDSSTRING /AWS1/RDSSTRING¶
A specific DB snapshot identifier to describe. This value is stored as a lowercase string.
Constraints:
If supplied, must match the identifier of an existing DBSnapshot.
If this identifier is for an automated snapshot, the
SnapshotTypeparameter must also be specified.
iv_snapshottype TYPE /AWS1/RDSSTRING /AWS1/RDSSTRING¶
The type of snapshots to be returned. You can specify one of the following values:
automated- Return all DB snapshots that have been automatically taken by Amazon RDS for my Amazon Web Services account.
manual- Return all DB snapshots that have been taken by my Amazon Web Services account.
shared- Return all manual DB snapshots that have been shared to my Amazon Web Services account.
public- Return all DB snapshots that have been marked as public.
awsbackup- Return the DB snapshots managed by the Amazon Web Services Backup service.For information about Amazon Web Services Backup, see the Amazon Web Services Backup Developer Guide.
The
awsbackuptype does not apply to Aurora.If you don't specify a
SnapshotTypevalue, then both automated and manual snapshots are returned. Shared and public DB snapshots are not included in the returned results by default. You can include shared snapshots with these results by enabling theIncludeSharedparameter. You can include public snapshots with these results by enabling theIncludePublicparameter.The
IncludeSharedandIncludePublicparameters don't apply forSnapshotTypevalues ofmanualorautomated. TheIncludePublicparameter doesn't apply whenSnapshotTypeis set toshared. TheIncludeSharedparameter doesn't apply whenSnapshotTypeis set topublic.
it_filters TYPE /AWS1/CL_RDSFILTER=>TT_FILTERLIST TT_FILTERLIST¶
A filter that specifies one or more DB snapshots to describe.
Supported filters:
db-instance-id- Accepts DB instance identifiers and DB instance Amazon Resource Names (ARNs).
db-snapshot-id- Accepts DB snapshot identifiers.
dbi-resource-id- Accepts identifiers of source DB instances.
snapshot-type- Accepts types of DB snapshots.
engine- Accepts names of database engines.
iv_maxrecords TYPE /AWS1/RDSINTEGEROPTIONAL /AWS1/RDSINTEGEROPTIONAL¶
The maximum number of records to include in the response. If more records exist than the specified
MaxRecordsvalue, a pagination token called a marker is included in the response so that you can retrieve the remaining results.Default: 100
Constraints: Minimum 20, maximum 100.
iv_marker TYPE /AWS1/RDSSTRING /AWS1/RDSSTRING¶
An optional pagination token provided by a previous
DescribeDBSnapshotsrequest. If this parameter is specified, the response includes only records beyond the marker, up to the value specified byMaxRecords.
iv_includeshared TYPE /AWS1/RDSBOOLEAN /AWS1/RDSBOOLEAN¶
Specifies whether to include shared manual DB cluster snapshots from other Amazon Web Services accounts that this Amazon Web Services account has been given permission to copy or restore. By default, these snapshots are not included.
You can give an Amazon Web Services account permission to restore a manual DB snapshot from another Amazon Web Services account by using the
ModifyDBSnapshotAttributeAPI action.This setting doesn't apply to RDS Custom.
iv_includepublic TYPE /AWS1/RDSBOOLEAN /AWS1/RDSBOOLEAN¶
Specifies whether to include manual DB cluster snapshots that are public and can be copied or restored by any Amazon Web Services account. By default, the public snapshots are not included.
You can share a manual DB snapshot as public by using the ModifyDBSnapshotAttribute API.
This setting doesn't apply to RDS Custom.
iv_dbiresourceid TYPE /AWS1/RDSSTRING /AWS1/RDSSTRING¶
A specific DB resource ID to describe.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_rdsdbsnapshotmessage /AWS1/CL_RDSDBSNAPSHOTMESSAGE¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->describedbsnapshots(
it_filters = VALUE /aws1/cl_rdsfilter=>tt_filterlist(
(
new /aws1/cl_rdsfilter(
it_values = VALUE /aws1/cl_rdsfiltervaluelist_w=>tt_filtervaluelist(
( new /aws1/cl_rdsfiltervaluelist_w( |string| ) )
)
iv_name = |string|
)
)
)
iv_dbinstanceidentifier = |string|
iv_dbiresourceid = |string|
iv_dbsnapshotidentifier = |string|
iv_includepublic = ABAP_TRUE
iv_includeshared = ABAP_TRUE
iv_marker = |string|
iv_maxrecords = 123
iv_snapshottype = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_string = lo_result->get_marker( ).
LOOP AT lo_result->get_dbsnapshots( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_dbsnapshotidentifier( ).
lv_string = lo_row_1->get_dbinstanceidentifier( ).
lv_tstamp = lo_row_1->get_snapshotcreatetime( ).
lv_string = lo_row_1->get_engine( ).
lv_integer = lo_row_1->get_allocatedstorage( ).
lv_string = lo_row_1->get_status( ).
lv_integer = lo_row_1->get_port( ).
lv_string = lo_row_1->get_availabilityzone( ).
lv_string = lo_row_1->get_vpcid( ).
lv_tstamp = lo_row_1->get_instancecreatetime( ).
lv_string = lo_row_1->get_masterusername( ).
lv_string = lo_row_1->get_engineversion( ).
lv_string = lo_row_1->get_licensemodel( ).
lv_string = lo_row_1->get_snapshottype( ).
lv_integeroptional = lo_row_1->get_iops( ).
lv_integeroptional = lo_row_1->get_storagethroughput( ).
lv_string = lo_row_1->get_optiongroupname( ).
lv_integer = lo_row_1->get_percentprogress( ).
lv_string = lo_row_1->get_sourceregion( ).
lv_string = lo_row_1->get_sourcedbsnapshotid( ).
lv_string = lo_row_1->get_storagetype( ).
lv_string = lo_row_1->get_tdecredentialarn( ).
lv_boolean = lo_row_1->get_encrypted( ).
lv_string = lo_row_1->get_kmskeyid( ).
lv_string = lo_row_1->get_dbsnapshotarn( ).
lv_string = lo_row_1->get_timezone( ).
lv_boolean = lo_row_1->get_iamdatabaseauthntctnenbd( ).
LOOP AT lo_row_1->get_processorfeatures( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_name( ).
lv_string = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_row_1->get_dbiresourceid( ).
LOOP AT lo_row_1->get_taglist( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_string = lo_row_5->get_key( ).
lv_string = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_row_1->get_snapshottarget( ).
lv_tstamp = lo_row_1->get_originalsnapcreatetime( ).
lv_tstamp = lo_row_1->get_snapshotdatabasetime( ).
lv_string = lo_row_1->get_dbsystemid( ).
lv_booleanoptional = lo_row_1->get_multitenant( ).
lv_boolean = lo_row_1->get_dedicatedlogvolume( ).
lv_string = lo_row_1->get_snapshotavailabilityzone( ).
ENDIF.
ENDLOOP.
ENDIF.
To describe a DB snapshot for a DB instance¶
The following example retrieves the details of a DB snapshot for a DB instance.
DATA(lo_result) = lo_client->describedbsnapshots( iv_dbsnapshotidentifier = |mydbsnapshot| ) .