/AWS1/IF_DOD=>MODIFYDBCLUSTER()¶
About ModifyDBCluster¶
Modifies a setting for an Amazon DocumentDB cluster. You can change one or more database configuration parameters by specifying these parameters and the new values in the request.
Method Signature¶
METHODS /AWS1/IF_DOD~MODIFYDBCLUSTER
IMPORTING
!IV_DBCLUSTERIDENTIFIER TYPE /AWS1/DODSTRING OPTIONAL
!IV_NEWDBCLUSTERIDENTIFIER TYPE /AWS1/DODSTRING OPTIONAL
!IV_APPLYIMMEDIATELY TYPE /AWS1/DODBOOLEAN OPTIONAL
!IV_BACKUPRETENTIONPERIOD TYPE /AWS1/DODINTEGEROPTIONAL OPTIONAL
!IV_DBCLUSTERPARAMGROUPNAME TYPE /AWS1/DODSTRING OPTIONAL
!IT_VPCSECURITYGROUPIDS TYPE /AWS1/CL_DODVPCSECGRPIDLIST_W=>TT_VPCSECURITYGROUPIDLIST OPTIONAL
!IV_PORT TYPE /AWS1/DODINTEGEROPTIONAL OPTIONAL
!IV_MASTERUSERPASSWORD TYPE /AWS1/DODSTRING OPTIONAL
!IV_PREFERREDBACKUPWINDOW TYPE /AWS1/DODSTRING OPTIONAL
!IV_PREFERREDMAINTENANCEWIN00 TYPE /AWS1/DODSTRING OPTIONAL
!IO_CLOUDWATCHLOGSEXPORTCONF TYPE REF TO /AWS1/CL_DODCLOUDWATCHLOGSEX00 OPTIONAL
!IV_ENGINEVERSION TYPE /AWS1/DODSTRING OPTIONAL
!IV_ALLOWMAJORVERSIONUPGRADE TYPE /AWS1/DODBOOLEAN OPTIONAL
!IV_DELETIONPROTECTION TYPE /AWS1/DODBOOLEANOPTIONAL OPTIONAL
!IV_STORAGETYPE TYPE /AWS1/DODSTRING OPTIONAL
!IO_SERVERLESSV2SCALINGCONF TYPE REF TO /AWS1/CL_DODSRVLESSV2SCACONF OPTIONAL
!IV_MANAGEMASTERUSERPASSWORD TYPE /AWS1/DODBOOLEANOPTIONAL OPTIONAL
!IV_MASTERUSERSECRETKMSKEYID TYPE /AWS1/DODSTRING OPTIONAL
!IV_ROTATEMASTERUSERPASSWORD TYPE /AWS1/DODBOOLEANOPTIONAL OPTIONAL
!IV_NETWORKTYPE TYPE /AWS1/DODSTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_dodmodifydbclustrslt
RAISING
/AWS1/CX_DODDBCLSTALREXFAULT
/AWS1/CX_DODDBCLUSTNOTFNDFAULT
/AWS1/CX_DODDBCLSTPRMGRNOTFN00
/AWS1/CX_DODDBSNETGRNOTFNDFA00
/AWS1/CX_DODINVDBCLSTSTATEFA00
/AWS1/CX_DODINVDBINSTSTATEFA00
/AWS1/CX_DODINVDBSECGRSTATEF00
/AWS1/CX_DODINVDBSNETGRSTATE00
/AWS1/CX_DODINVALIDSUBNET
/AWS1/CX_DODINVVPCNETWORKSTA00
/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 cluster identifier for the cluster that is being modified. This parameter is not case sensitive.
Constraints:
Must match the identifier of an existing
DBCluster.
Optional arguments:¶
iv_newdbclusteridentifier TYPE /AWS1/DODSTRING /AWS1/DODSTRING¶
The new cluster identifier for the cluster when renaming a cluster. This value is stored as a lowercase string.
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-cluster2
iv_applyimmediately TYPE /AWS1/DODBOOLEAN /AWS1/DODBOOLEAN¶
A value that specifies whether the changes in this request and any pending changes are asynchronously applied as soon as possible, regardless of the
PreferredMaintenanceWindowsetting for the cluster. If this parameter is set tofalse, changes to the cluster are applied during the next maintenance window.The
ApplyImmediatelyparameter affects only theNewDBClusterIdentifierandMasterUserPasswordvalues. If you set this parameter value tofalse, the changes to theNewDBClusterIdentifierandMasterUserPasswordvalues are applied during the next maintenance window. All other changes are applied immediately, regardless of the value of theApplyImmediatelyparameter.Default:
false
iv_backupretentionperiod TYPE /AWS1/DODINTEGEROPTIONAL /AWS1/DODINTEGEROPTIONAL¶
The number of days for which automated backups are retained. You must specify a minimum value of 1.
Default: 1
Constraints:
Must be a value from 1 to 35.
iv_dbclusterparamgroupname TYPE /AWS1/DODSTRING /AWS1/DODSTRING¶
The name of the cluster parameter group to use for the cluster.
it_vpcsecuritygroupids TYPE /AWS1/CL_DODVPCSECGRPIDLIST_W=>TT_VPCSECURITYGROUPIDLIST TT_VPCSECURITYGROUPIDLIST¶
A list of virtual private cloud (VPC) security groups that the cluster will belong to.
iv_port TYPE /AWS1/DODINTEGEROPTIONAL /AWS1/DODINTEGEROPTIONAL¶
The port number on which the cluster accepts connections.
Constraints: Must be a value from
1150to65535.Default: The same port as the original cluster.
iv_masteruserpassword TYPE /AWS1/DODSTRING /AWS1/DODSTRING¶
The password for the master database user. This password can contain any printable ASCII character except forward slash (/), double quote ("), or the "at" symbol (@).
Constraints: Must contain from 8 to 100 characters.
iv_preferredbackupwindow TYPE /AWS1/DODSTRING /AWS1/DODSTRING¶
The daily time range during which automated backups are created if automated backups are enabled, using the
BackupRetentionPeriodparameter.The default is a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region.
Constraints:
Must be in the format
hh24:mi-hh24:mi.Must be in Universal Coordinated Time (UTC).
Must not conflict with the preferred maintenance window.
Must be at least 30 minutes.
iv_preferredmaintenancewin00 TYPE /AWS1/DODSTRING /AWS1/DODSTRING¶
The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
Format:
ddd:hh24:mi-ddd:hh24:miThe default is a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region, occurring on a random day of the week.
Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
Constraints: Minimum 30-minute window.
io_cloudwatchlogsexportconf TYPE REF TO /AWS1/CL_DODCLOUDWATCHLOGSEX00 /AWS1/CL_DODCLOUDWATCHLOGSEX00¶
The configuration setting for the log types to be enabled for export to Amazon CloudWatch Logs for a specific instance or cluster. The
EnableLogTypesandDisableLogTypesarrays determine which logs are exported (or not exported) to CloudWatch Logs.
iv_engineversion TYPE /AWS1/DODSTRING /AWS1/DODSTRING¶
The version number of the database engine to which you want to upgrade. Changing this parameter results in an outage. The change is applied during the next maintenance window unless
ApplyImmediatelyis enabled.To list all of the available engine versions for Amazon DocumentDB use the following command:
aws docdb describe-db-engine-versions --engine docdb --query "DBEngineVersions[].EngineVersion"
iv_allowmajorversionupgrade TYPE /AWS1/DODBOOLEAN /AWS1/DODBOOLEAN¶
A value that indicates whether major version upgrades are allowed.
Constraints:
You must allow major version upgrades when specifying a value for the
EngineVersionparameter that is a different major version than the cluster's current version.Since some parameters are version specific, changing them requires executing a new
ModifyDBClusterAPI call after the in-place MVU completes.Performing an MVU directly impacts the following parameters:
MasterUserPassword
NewDBClusterIdentifier
VpcSecurityGroupIds
Port
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_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
io_serverlessv2scalingconf TYPE REF TO /AWS1/CL_DODSRVLESSV2SCACONF /AWS1/CL_DODSRVLESSV2SCACONF¶
Contains the scaling configuration of an Amazon DocumentDB Serverless cluster.
iv_managemasteruserpassword TYPE /AWS1/DODBOOLEANOPTIONAL /AWS1/DODBOOLEANOPTIONAL¶
Specifies whether to manage the master user password with Amazon Web Services Secrets Manager. If the cluster doesn't manage the master user password with Amazon Web Services Secrets Manager, you can turn on this management. In this case, you can't specify
MasterUserPassword. If the cluster already manages the master user password with Amazon Web Services Secrets Manager, and you specify that the master user password is not managed with Amazon Web Services Secrets Manager, then you must specifyMasterUserPassword. In this case, Amazon DocumentDB deletes the secret and uses the new password for the master user specified byMasterUserPassword.
iv_masterusersecretkmskeyid TYPE /AWS1/DODSTRING /AWS1/DODSTRING¶
The Amazon Web Services KMS key identifier to encrypt a secret that is automatically generated and managed in Amazon Web Services Secrets Manager.
This setting is valid only if both of the following conditions are met:
The cluster doesn't manage the master user password in Amazon Web Services Secrets Manager. If the cluster already manages the master user password in Amazon Web Services Secrets Manager, you can't change the KMS key that is used to encrypt the secret.
You are enabling
ManageMasterUserPasswordto manage the master user password in Amazon Web Services Secrets Manager. If you are turning onManageMasterUserPasswordand don't specifyMasterUserSecretKmsKeyId, then theaws/secretsmanagerKMS key is used to encrypt the secret. If the secret is in a different Amazon Web Services account, then you can't use theaws/secretsmanagerKMS key to encrypt the secret, and you must use a customer managed KMS key.The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.
There is a default KMS key for your Amazon Web Services account. Your Amazon Web Services account has a different default KMS key for each Amazon Web Services Region.
iv_rotatemasteruserpassword TYPE /AWS1/DODBOOLEANOPTIONAL /AWS1/DODBOOLEANOPTIONAL¶
Specifies whether to rotate the secret managed by Amazon Web Services Secrets Manager for the master user password.
This setting is valid only if the master user password is managed by Amazon DocumentDB in Amazon Web Services Secrets Manager for the cluster. The secret value contains the updated password.
Constraint: You must apply the change immediately when rotating the master user password.
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_dodmodifydbclustrslt /AWS1/CL_DODMODIFYDBCLUSTRSLT¶
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->modifydbcluster(
io_cloudwatchlogsexportconf = new /aws1/cl_dodcloudwatchlogsex00(
it_disablelogtypes = VALUE /aws1/cl_dodlogtypelist_w=>tt_logtypelist(
( new /aws1/cl_dodlogtypelist_w( |string| ) )
)
it_enablelogtypes = VALUE /aws1/cl_dodlogtypelist_w=>tt_logtypelist(
( new /aws1/cl_dodlogtypelist_w( |string| ) )
)
)
io_serverlessv2scalingconf = new /aws1/cl_dodsrvlessv2scaconf(
iv_maxcapacity = '0.1'
iv_mincapacity = '0.1'
)
it_vpcsecuritygroupids = VALUE /aws1/cl_dodvpcsecgrpidlist_w=>tt_vpcsecuritygroupidlist(
( new /aws1/cl_dodvpcsecgrpidlist_w( |string| ) )
)
iv_allowmajorversionupgrade = ABAP_TRUE
iv_applyimmediately = ABAP_TRUE
iv_backupretentionperiod = 123
iv_dbclusteridentifier = |string|
iv_dbclusterparamgroupname = |string|
iv_deletionprotection = ABAP_TRUE
iv_engineversion = |string|
iv_managemasteruserpassword = ABAP_TRUE
iv_masteruserpassword = |string|
iv_masterusersecretkmskeyid = |string|
iv_networktype = |string|
iv_newdbclusteridentifier = |string|
iv_port = 123
iv_preferredbackupwindow = |string|
iv_preferredmaintenancewin00 = |string|
iv_rotatemasteruserpassword = ABAP_TRUE
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.