/AWS1/IF_DOD=>RESTOREDBCLUSTERFROMSNAPSHOT()¶
About RestoreDBClusterFromSnapshot¶
Creates a new cluster from a snapshot or cluster snapshot.
If a snapshot is specified, the target cluster is created from the source DB snapshot with a default configuration and default security group.
If a cluster snapshot is specified, the target cluster is created from the source cluster restore point with the same configuration as the original source DB cluster, except that the new cluster is created with the default security group.
Method Signature¶
METHODS /AWS1/IF_DOD~RESTOREDBCLUSTERFROMSNAPSHOT
  IMPORTING
    !IT_AVAILABILITYZONES TYPE /AWS1/CL_DODAZS_W=>TT_AVAILABILITYZONES OPTIONAL
    !IV_DBCLUSTERIDENTIFIER TYPE /AWS1/DODSTRING OPTIONAL
    !IV_SNAPSHOTIDENTIFIER TYPE /AWS1/DODSTRING OPTIONAL
    !IV_ENGINE TYPE /AWS1/DODSTRING OPTIONAL
    !IV_ENGINEVERSION TYPE /AWS1/DODSTRING OPTIONAL
    !IV_PORT TYPE /AWS1/DODINTEGEROPTIONAL OPTIONAL
    !IV_DBSUBNETGROUPNAME TYPE /AWS1/DODSTRING OPTIONAL
    !IT_VPCSECURITYGROUPIDS TYPE /AWS1/CL_DODVPCSECGRPIDLIST_W=>TT_VPCSECURITYGROUPIDLIST OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_DODTAG=>TT_TAGLIST OPTIONAL
    !IV_KMSKEYID TYPE /AWS1/DODSTRING OPTIONAL
    !IT_ENABLECLOUDWATCHLOGSEXP TYPE /AWS1/CL_DODLOGTYPELIST_W=>TT_LOGTYPELIST OPTIONAL
    !IV_DELETIONPROTECTION TYPE /AWS1/DODBOOLEANOPTIONAL OPTIONAL
    !IV_DBCLUSTERPARAMGROUPNAME TYPE /AWS1/DODSTRING OPTIONAL
    !IO_SERVERLESSV2SCALINGCONF TYPE REF TO /AWS1/CL_DODSRVLESSV2SCACONF OPTIONAL
    !IV_STORAGETYPE TYPE /AWS1/DODSTRING OPTIONAL
    !IV_NETWORKTYPE TYPE /AWS1/DODSTRING OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_dodrestoredbclstfrm01
  RAISING
    /AWS1/CX_DODDBCLSTALREXFAULT
    /AWS1/CX_DODDBCLSTQUOTAEXCDF00
    /AWS1/CX_DODDBCLSTSNAPNOTFND00
    /AWS1/CX_DODDBSNAPNOTFNDFAULT
    /AWS1/CX_DODDBSNETGRNOTFNDFA00
    /AWS1/CX_DODINSUFFICIENTDBCL00
    /AWS1/CX_DODINSUFFICIENTSTRG00
    /AWS1/CX_DODINVDBCLSTSNAPSTA00
    /AWS1/CX_DODINVDBSNAPSTATEFA00
    /AWS1/CX_DODINVRESTOREFAULT
    /AWS1/CX_DODINVALIDSUBNET
    /AWS1/CX_DODINVVPCNETWORKSTA00
    /AWS1/CX_DODKMSKEYNOTACCIBLE00
    /AWS1/CX_DODNETWORKTYPENOTSUPP
    /AWS1/CX_DODSTRGQUOTAEXCDFAULT
    /AWS1/CX_DODCLIENTEXC
    /AWS1/CX_DODSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_dbclusteridentifier TYPE /AWS1/DODSTRING /AWS1/DODSTRING¶
The name of the cluster to create from the snapshot or cluster snapshot. This parameter isn't 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:
my-snapshot-id
iv_snapshotidentifier TYPE /AWS1/DODSTRING /AWS1/DODSTRING¶
The identifier for the snapshot or cluster snapshot to restore from.
You can use either the name or the Amazon Resource Name (ARN) to specify a cluster snapshot. However, you can use only the ARN to specify a snapshot.
Constraints:
Must match the identifier of an existing snapshot.
iv_engine TYPE /AWS1/DODSTRING /AWS1/DODSTRING¶
The database engine to use for the new cluster.
Default: The same as source.
Constraint: Must be compatible with the engine of the source.
Optional arguments:¶
it_availabilityzones TYPE /AWS1/CL_DODAZS_W=>TT_AVAILABILITYZONES TT_AVAILABILITYZONES¶
Provides the list of Amazon EC2 Availability Zones that instances in the restored DB cluster can be created in.
iv_engineversion TYPE /AWS1/DODSTRING /AWS1/DODSTRING¶
The version of the database engine to use for the new cluster.
iv_port TYPE /AWS1/DODINTEGEROPTIONAL /AWS1/DODINTEGEROPTIONAL¶
The port number on which the new cluster accepts connections.
Constraints: Must be a value from
1150to65535.Default: The same port as the original cluster.
iv_dbsubnetgroupname TYPE /AWS1/DODSTRING /AWS1/DODSTRING¶
The name of the subnet group to use for the new cluster.
Constraints: If provided, must match the name of an existing
DBSubnetGroup.Example:
mySubnetgroup
it_vpcsecuritygroupids TYPE /AWS1/CL_DODVPCSECGRPIDLIST_W=>TT_VPCSECURITYGROUPIDLIST TT_VPCSECURITYGROUPIDLIST¶
A list of virtual private cloud (VPC) security groups that the new cluster will belong to.
it_tags TYPE /AWS1/CL_DODTAG=>TT_TAGLIST TT_TAGLIST¶
The tags to be assigned to the restored cluster.
iv_kmskeyid TYPE /AWS1/DODSTRING /AWS1/DODSTRING¶
The KMS key identifier to use when restoring an encrypted cluster from a DB snapshot or cluster snapshot.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are restoring a cluster with the same Amazon Web Services account that owns the KMS encryption key used to encrypt the new cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key.
If you do not specify a value for the
KmsKeyIdparameter, then the following occurs:
If the snapshot or cluster snapshot in
SnapshotIdentifieris encrypted, then the restored cluster is encrypted using the KMS key that was used to encrypt the snapshot or the cluster snapshot.
If the snapshot or the cluster snapshot in
SnapshotIdentifieris not encrypted, then the restored DB cluster is not encrypted.
it_enablecloudwatchlogsexp TYPE /AWS1/CL_DODLOGTYPELIST_W=>TT_LOGTYPELIST TT_LOGTYPELIST¶
A list of log types that must be enabled for exporting to Amazon CloudWatch Logs.
iv_deletionprotection TYPE /AWS1/DODBOOLEANOPTIONAL /AWS1/DODBOOLEANOPTIONAL¶
Specifies whether this cluster can be deleted. If
DeletionProtectionis enabled, the cluster cannot be deleted unless it is modified andDeletionProtectionis disabled.DeletionProtectionprotects clusters from being accidentally deleted.
iv_dbclusterparamgroupname TYPE /AWS1/DODSTRING /AWS1/DODSTRING¶
The name of the DB cluster parameter group to associate with this DB cluster.
Type: String. Required: No.
If this argument is omitted, the default DB cluster parameter group is used. If supplied, must match the name of an existing default DB cluster parameter group. The string must consist of from 1 to 255 letters, numbers or hyphens. Its first character must be a letter, and it cannot end with a hyphen or contain two consecutive hyphens.
io_serverlessv2scalingconf TYPE REF TO /AWS1/CL_DODSRVLESSV2SCACONF /AWS1/CL_DODSRVLESSV2SCACONF¶
Contains the scaling configuration of an Amazon DocumentDB Serverless cluster.
iv_storagetype TYPE /AWS1/DODSTRING /AWS1/DODSTRING¶
The storage type to associate with the DB cluster.
For information on storage types for Amazon DocumentDB clusters, see Cluster storage configurations in the Amazon DocumentDB Developer Guide.
Valid values for storage type -
standard | iopt1Default value is
standard
iv_networktype TYPE /AWS1/DODSTRING /AWS1/DODSTRING¶
The network type of the cluster.
The network type is determined by the
DBSubnetGroupspecified for the cluster. ADBSubnetGroupcan support only the IPv4 protocol or the IPv4 and the IPv6 protocols (DUAL).For more information, see DocumentDB clusters in a VPC in the Amazon DocumentDB Developer Guide.
Valid Values:
IPV4|DUAL
RETURNING¶
oo_output TYPE REF TO /aws1/cl_dodrestoredbclstfrm01 /AWS1/CL_DODRESTOREDBCLSTFRM01¶
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->restoredbclusterfromsnapshot(
  io_serverlessv2scalingconf = new /aws1/cl_dodsrvlessv2scaconf(
    iv_maxcapacity = '0.1'
    iv_mincapacity = '0.1'
  )
  it_availabilityzones = VALUE /aws1/cl_dodazs_w=>tt_availabilityzones(
    ( new /aws1/cl_dodazs_w( |string| ) )
  )
  it_enablecloudwatchlogsexp = VALUE /aws1/cl_dodlogtypelist_w=>tt_logtypelist(
    ( new /aws1/cl_dodlogtypelist_w( |string| ) )
  )
  it_tags = VALUE /aws1/cl_dodtag=>tt_taglist(
    (
      new /aws1/cl_dodtag(
        iv_key = |string|
        iv_value = |string|
      )
    )
  )
  it_vpcsecuritygroupids = VALUE /aws1/cl_dodvpcsecgrpidlist_w=>tt_vpcsecuritygroupidlist(
    ( new /aws1/cl_dodvpcsecgrpidlist_w( |string| ) )
  )
  iv_dbclusteridentifier = |string|
  iv_dbclusterparamgroupname = |string|
  iv_dbsubnetgroupname = |string|
  iv_deletionprotection = ABAP_TRUE
  iv_engine = |string|
  iv_engineversion = |string|
  iv_kmskeyid = |string|
  iv_networktype = |string|
  iv_port = 123
  iv_snapshotidentifier = |string|
  iv_storagetype = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_dbcluster = lo_result->get_dbcluster( ).
  IF lo_dbcluster IS NOT INITIAL.
    LOOP AT lo_dbcluster->get_availabilityzones( ) 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_integeroptional = lo_dbcluster->get_backupretentionperiod( ).
    lv_string = lo_dbcluster->get_dbclusteridentifier( ).
    lv_string = lo_dbcluster->get_dbclusterparametergroup( ).
    lv_string = lo_dbcluster->get_dbsubnetgroup( ).
    lv_string = lo_dbcluster->get_status( ).
    lv_string = lo_dbcluster->get_percentprogress( ).
    lv_tstamp = lo_dbcluster->get_earliestrestorabletime( ).
    lv_string = lo_dbcluster->get_endpoint( ).
    lv_string = lo_dbcluster->get_readerendpoint( ).
    lv_boolean = lo_dbcluster->get_multiaz( ).
    lv_string = lo_dbcluster->get_engine( ).
    lv_string = lo_dbcluster->get_engineversion( ).
    lv_tstamp = lo_dbcluster->get_latestrestorabletime( ).
    lv_integeroptional = lo_dbcluster->get_port( ).
    lv_string = lo_dbcluster->get_masterusername( ).
    lv_string = lo_dbcluster->get_preferredbackupwindow( ).
    lv_string = lo_dbcluster->get_preferredmaintenancewi00( ).
    lv_string = lo_dbcluster->get_replsourceidentifier( ).
    LOOP AT lo_dbcluster->get_readreplicaidentifiers( ) 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.
    LOOP AT lo_dbcluster->get_dbclustermembers( ) into lo_row_4.
      lo_row_5 = lo_row_4.
      IF lo_row_5 IS NOT INITIAL.
        lv_string = lo_row_5->get_dbinstanceidentifier( ).
        lv_boolean = lo_row_5->get_isclusterwriter( ).
        lv_string = lo_row_5->get_dbclustparamgroupstatus( ).
        lv_integeroptional = lo_row_5->get_promotiontier( ).
      ENDIF.
    ENDLOOP.
    LOOP AT lo_dbcluster->get_vpcsecuritygroups( ) into lo_row_6.
      lo_row_7 = lo_row_6.
      IF lo_row_7 IS NOT INITIAL.
        lv_string = lo_row_7->get_vpcsecuritygroupid( ).
        lv_string = lo_row_7->get_status( ).
      ENDIF.
    ENDLOOP.
    lv_string = lo_dbcluster->get_hostedzoneid( ).
    lv_boolean = lo_dbcluster->get_storageencrypted( ).
    lv_string = lo_dbcluster->get_kmskeyid( ).
    lv_string = lo_dbcluster->get_dbclusterresourceid( ).
    lv_string = lo_dbcluster->get_dbclusterarn( ).
    LOOP AT lo_dbcluster->get_associatedroles( ) into lo_row_8.
      lo_row_9 = lo_row_8.
      IF lo_row_9 IS NOT INITIAL.
        lv_string = lo_row_9->get_rolearn( ).
        lv_string = lo_row_9->get_status( ).
      ENDIF.
    ENDLOOP.
    lv_string = lo_dbcluster->get_clonegroupid( ).
    lv_tstamp = lo_dbcluster->get_clustercreatetime( ).
    LOOP AT lo_dbcluster->get_enabledcloudwatchlogsexp( ) into lo_row_10.
      lo_row_11 = lo_row_10.
      IF lo_row_11 IS NOT INITIAL.
        lv_string = lo_row_11->get_value( ).
      ENDIF.
    ENDLOOP.
    lv_boolean = lo_dbcluster->get_deletionprotection( ).
    lv_tstamp = lo_dbcluster->get_iooptmzdnextalwdmodtime( ).
    lv_string = lo_dbcluster->get_storagetype( ).
    lo_serverlessv2scalingconf = lo_dbcluster->get_serverlessv2scalingconf( ).
    IF lo_serverlessv2scalingconf IS NOT INITIAL.
      lv_doubleoptional = lo_serverlessv2scalingconf->get_mincapacity( ).
      lv_doubleoptional = lo_serverlessv2scalingconf->get_maxcapacity( ).
    ENDIF.
    lo_clustermasterusersecret = lo_dbcluster->get_masterusersecret( ).
    IF lo_clustermasterusersecret IS NOT INITIAL.
      lv_string = lo_clustermasterusersecret->get_secretarn( ).
      lv_string = lo_clustermasterusersecret->get_secretstatus( ).
      lv_string = lo_clustermasterusersecret->get_kmskeyid( ).
    ENDIF.
    lv_string = lo_dbcluster->get_networktype( ).
  ENDIF.
ENDIF.