/AWS1/IF_DOE=>COPYCLUSTERSNAPSHOT()¶
About CopyClusterSnapshot¶
Copies a snapshot of an elastic cluster.
Method Signature¶
METHODS /AWS1/IF_DOE~COPYCLUSTERSNAPSHOT
IMPORTING
!IV_SNAPSHOTARN TYPE /AWS1/DOESTRING OPTIONAL
!IV_TARGETSNAPSHOTNAME TYPE /AWS1/DOESTRING OPTIONAL
!IV_KMSKEYID TYPE /AWS1/DOESTRING OPTIONAL
!IV_COPYTAGS TYPE /AWS1/DOEBOOLEAN OPTIONAL
!IT_TAGS TYPE /AWS1/CL_DOETAGMAP_W=>TT_TAGMAP OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_doecopyclustsnapout
RAISING
/AWS1/CX_DOEACCESSDENIEDEX
/AWS1/CX_DOECONFLICTEXCEPTION
/AWS1/CX_DOEINTERNALSERVEREX
/AWS1/CX_DOERESOURCENOTFOUNDEX
/AWS1/CX_DOESERVICEQUOTAEXCDEX
/AWS1/CX_DOETHROTTLINGEX
/AWS1/CX_DOEVALIDATIONEX
/AWS1/CX_DOECLIENTEXC
/AWS1/CX_DOESERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_snapshotarn TYPE /AWS1/DOESTRING /AWS1/DOESTRING¶
The Amazon Resource Name (ARN) identifier of the elastic cluster snapshot.
iv_targetsnapshotname TYPE /AWS1/DOESTRING /AWS1/DOESTRING¶
The identifier of the new elastic cluster snapshot to create from the source cluster snapshot. This parameter is not case sensitive.
Constraints:
Must contain from 1 to 63 letters, numbers, or hyphens.
The first character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Example:
elastic-cluster-snapshot-5
Optional arguments:¶
iv_kmskeyid TYPE /AWS1/DOESTRING /AWS1/DOESTRING¶
The Amazon Web Services KMS key ID for an encrypted elastic cluster snapshot. The Amazon Web Services KMS key ID is the Amazon Resource Name (ARN), Amazon Web Services KMS key identifier, or the Amazon Web Services KMS key alias for the Amazon Web Services KMS encryption key.
If you copy an encrypted elastic cluster snapshot from your Amazon Web Services account, you can specify a value for
KmsKeyIdto encrypt the copy with a new Amazon Web ServicesS KMS encryption key. If you don't specify a value forKmsKeyId, then the copy of the elastic cluster snapshot is encrypted with the sameAWSKMS key as the source elastic cluster snapshot.To copy an encrypted elastic cluster snapshot to another Amazon Web Services region, set
KmsKeyIdto the Amazon Web Services KMS key ID that you want to use to encrypt the copy of the elastic cluster snapshot in the destination region. Amazon Web Services KMS encryption keys are specific to the Amazon Web Services region that they are created in, and you can't use encryption keys from one Amazon Web Services region in another Amazon Web Services region.If you copy an unencrypted elastic cluster snapshot and specify a value for the
KmsKeyIdparameter, an error is returned.
iv_copytags TYPE /AWS1/DOEBOOLEAN /AWS1/DOEBOOLEAN¶
Set to
trueto copy all tags from the source cluster snapshot to the target elastic cluster snapshot. The default isfalse.
it_tags TYPE /AWS1/CL_DOETAGMAP_W=>TT_TAGMAP TT_TAGMAP¶
The tags to be assigned to the elastic cluster snapshot.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_doecopyclustsnapout /AWS1/CL_DOECOPYCLUSTSNAPOUT¶
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->copyclustersnapshot(
it_tags = VALUE /aws1/cl_doetagmap_w=>tt_tagmap(
(
VALUE /aws1/cl_doetagmap_w=>ts_tagmap_maprow(
key = |string|
value = new /aws1/cl_doetagmap_w( |string| )
)
)
)
iv_copytags = ABAP_TRUE
iv_kmskeyid = |string|
iv_snapshotarn = |string|
iv_targetsnapshotname = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_clustersnapshot = lo_result->get_snapshot( ).
IF lo_clustersnapshot IS NOT INITIAL.
LOOP AT lo_clustersnapshot->get_subnetids( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_clustersnapshot->get_snapshotname( ).
lv_string = lo_clustersnapshot->get_snapshotarn( ).
lv_string = lo_clustersnapshot->get_snapshotcreationtime( ).
lv_string = lo_clustersnapshot->get_clusterarn( ).
lv_string = lo_clustersnapshot->get_clustercreationtime( ).
lv_status = lo_clustersnapshot->get_status( ).
LOOP AT lo_clustersnapshot->get_vpcsecuritygroupids( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_clustersnapshot->get_adminusername( ).
lv_string = lo_clustersnapshot->get_kmskeyid( ).
lv_snapshottype = lo_clustersnapshot->get_snapshottype( ).
ENDIF.
ENDIF.
Basic Copy Cluster Snapshot Example¶
update applied
DATA(lo_result) = lo_client->copyclustersnapshot(
iv_snapshotarn = |arn:aws:docdb-elastic:us-east-1:$AWS_ACCOUNT_ID:cluster-snapshot/$SOURCE_SNAPSHOT_ID|
iv_targetsnapshotname = |sampleSnapshotName|
).