/AWS1/IF_RDS=>MODIFYDBCLUSTERSNAPSHOTATTR()¶
About ModifyDBClusterSnapshotAttribute¶
Adds an attribute and values to, or removes an attribute and values from, a manual DB cluster snapshot.
To share a manual DB cluster snapshot with other Amazon Web Services accounts, specify
restore as the AttributeName and use the
ValuesToAdd parameter to add a list of IDs of the Amazon Web Services accounts that are
authorized to restore the manual DB cluster snapshot. Use the value all to
make the manual DB cluster snapshot public, which means that it can be copied or
restored by all Amazon Web Services accounts.
Don't add the all value for any manual DB cluster snapshots
that contain private information that you don't want available to all Amazon Web Services
accounts.
If a manual DB cluster snapshot is encrypted, it can be shared, but only by
specifying a list of authorized Amazon Web Services account IDs for the ValuesToAdd
parameter. You can't use all as a value for that parameter in this
case.
To view which Amazon Web Services accounts have access to copy or restore a manual DB cluster
snapshot, or whether a manual DB cluster snapshot is public or private, use the DescribeDBClusterSnapshotAttributes API operation. The accounts are
returned as values for the restore attribute.
Method Signature¶
METHODS /AWS1/IF_RDS~MODIFYDBCLUSTERSNAPSHOTATTR
IMPORTING
!IV_DBCLUSTERSNAPSHOTID TYPE /AWS1/RDSSTRING OPTIONAL
!IV_ATTRIBUTENAME TYPE /AWS1/RDSSTRING OPTIONAL
!IT_VALUESTOADD TYPE /AWS1/CL_RDSATTRVALUELIST_W=>TT_ATTRIBUTEVALUELIST OPTIONAL
!IT_VALUESTOREMOVE TYPE /AWS1/CL_RDSATTRVALUELIST_W=>TT_ATTRIBUTEVALUELIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_rdsmoddbclstsnapatt01
RAISING
/AWS1/CX_RDSDBCLSTSNAPNOTFND00
/AWS1/CX_RDSINVDBCLSTSNAPSTA00
/AWS1/CX_RDSSHAREDSNAPQUOTAE00
/AWS1/CX_RDSCLIENTEXC
/AWS1/CX_RDSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_dbclustersnapshotid TYPE /AWS1/RDSSTRING /AWS1/RDSSTRING¶
The identifier for the DB cluster snapshot to modify the attributes for.
iv_attributename TYPE /AWS1/RDSSTRING /AWS1/RDSSTRING¶
The name of the DB cluster snapshot attribute to modify.
To manage authorization for other Amazon Web Services accounts to copy or restore a manual DB cluster snapshot, set this value to
restore.To view the list of attributes available to modify, use the DescribeDBClusterSnapshotAttributes API operation.
Optional arguments:¶
it_valuestoadd TYPE /AWS1/CL_RDSATTRVALUELIST_W=>TT_ATTRIBUTEVALUELIST TT_ATTRIBUTEVALUELIST¶
A list of DB cluster snapshot attributes to add to the attribute specified by
AttributeName.To authorize other Amazon Web Services accounts to copy or restore a manual DB cluster snapshot, set this list to include one or more Amazon Web Services account IDs, or
allto make the manual DB cluster snapshot restorable by any Amazon Web Services account. Do not add theallvalue for any manual DB cluster snapshots that contain private information that you don't want available to all Amazon Web Services accounts.
it_valuestoremove TYPE /AWS1/CL_RDSATTRVALUELIST_W=>TT_ATTRIBUTEVALUELIST TT_ATTRIBUTEVALUELIST¶
A list of DB cluster snapshot attributes to remove from the attribute specified by
AttributeName.To remove authorization for other Amazon Web Services accounts to copy or restore a manual DB cluster snapshot, set this list to include one or more Amazon Web Services account identifiers, or
allto remove authorization for any Amazon Web Services account to copy or restore the DB cluster snapshot. If you specifyall, an Amazon Web Services account whose account ID is explicitly added to therestoreattribute can still copy or restore a manual DB cluster snapshot.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_rdsmoddbclstsnapatt01 /AWS1/CL_RDSMODDBCLSTSNAPATT01¶
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->modifydbclustersnapshotattr(
it_valuestoadd = VALUE /aws1/cl_rdsattrvaluelist_w=>tt_attributevaluelist(
( new /aws1/cl_rdsattrvaluelist_w( |string| ) )
)
it_valuestoremove = VALUE /aws1/cl_rdsattrvaluelist_w=>tt_attributevaluelist(
( new /aws1/cl_rdsattrvaluelist_w( |string| ) )
)
iv_attributename = |string|
iv_dbclustersnapshotid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_dbclustersnapshotattrib = lo_result->get_dbclustersnapattrsresult( ).
IF lo_dbclustersnapshotattrib IS NOT INITIAL.
lv_string = lo_dbclustersnapshotattrib->get_dbclustersnapshotid( ).
LOOP AT lo_dbclustersnapshotattrib->get_dbclustersnapshotattrs( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_attributename( ).
LOOP AT lo_row_1->get_attributevalues( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
To modify a DB cluster snapshot attribute¶
The following example makes changes to the specified DB cluster snapshot attribute.
DATA(lo_result) = lo_client->modifydbclustersnapshotattr(
it_valuestoadd = VALUE /aws1/cl_rdsattrvaluelist_w=>tt_attributevaluelist(
( new /aws1/cl_rdsattrvaluelist_w( |123456789012| ) )
)
iv_attributename = |restore|
iv_dbclustersnapshotid = |myclustersnapshot|
).