Skip to content

/AWS1/IF_NEP=>CREATEDBINSTANCE()

About CreateDBInstance

Creates a new DB instance.

Method Signature

IMPORTING

Required arguments:

iv_dbinstanceidentifier TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

The DB instance identifier. This parameter is stored as a lowercase string.

Constraints:

  • Must contain from 1 to 63 letters, numbers, or hyphens.

  • First character must be a letter.

  • Cannot end with a hyphen or contain two consecutive hyphens.

Example: mydbinstance

iv_dbinstanceclass TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

The compute and memory capacity of the DB instance, for example, db.m4.large. Not all DB instance classes are available in all Amazon Regions.

iv_engine TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

The name of the database engine to be used for this instance.

Valid Values: neptune

iv_dbclusteridentifier TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

The identifier of the DB cluster that the instance will belong to.

For information on creating a DB cluster, see CreateDBCluster.

Type: String

Optional arguments:

iv_dbname TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

Not supported.

iv_allocatedstorage TYPE /AWS1/NEPINTEGEROPTIONAL /AWS1/NEPINTEGEROPTIONAL

Not supported by Neptune.

iv_masterusername TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

Not supported by Neptune.

iv_masteruserpassword TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

Not supported by Neptune.

it_dbsecuritygroups TYPE /AWS1/CL_NEPDBSECGRPNAMELIST_W=>TT_DBSECURITYGROUPNAMELIST TT_DBSECURITYGROUPNAMELIST

A list of DB security groups to associate with this DB instance.

Default: The default DB security group for the database engine.

it_vpcsecuritygroupids TYPE /AWS1/CL_NEPVPCSECGRPIDLIST_W=>TT_VPCSECURITYGROUPIDLIST TT_VPCSECURITYGROUPIDLIST

A list of EC2 VPC security groups to associate with this DB instance.

Not applicable. The associated list of EC2 VPC security groups is managed by the DB cluster. For more information, see CreateDBCluster.

Default: The default EC2 VPC security group for the DB subnet group's VPC.

iv_availabilityzone TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

The EC2 Availability Zone that the DB instance is created in

Default: A random, system-chosen Availability Zone in the endpoint's Amazon Region.

Example: us-east-1d

Constraint: The AvailabilityZone parameter can't be specified if the MultiAZ parameter is set to true. The specified Availability Zone must be in the same Amazon Region as the current endpoint.

iv_dbsubnetgroupname TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

A DB subnet group to associate with this DB instance.

If there is no DB subnet group, then it is a non-VPC DB instance.

iv_preferredmaintenancewin00 TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC).

Format: ddd:hh24:mi-ddd:hh24:mi

The default is a 30-minute window selected at random from an 8-hour block of time for each Amazon Region, occurring on a random day of the week.

Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.

Constraints: Minimum 30-minute window.

iv_dbparametergroupname TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

The name of the DB parameter group to associate with this DB instance. If this argument is omitted, the default DBParameterGroup for the specified engine is used.

Constraints:

  • Must be 1 to 255 letters, numbers, or hyphens.

  • First character must be a letter

  • Cannot end with a hyphen or contain two consecutive hyphens

iv_backupretentionperiod TYPE /AWS1/NEPINTEGEROPTIONAL /AWS1/NEPINTEGEROPTIONAL

The number of days for which automated backups are retained.

Not applicable. The retention period for automated backups is managed by the DB cluster. For more information, see CreateDBCluster.

Default: 1

Constraints:

  • Must be a value from 0 to 35

  • Cannot be set to 0 if the DB instance is a source to Read Replicas

iv_preferredbackupwindow TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

The daily time range during which automated backups are created.

Not applicable. The daily time range for creating automated backups is managed by the DB cluster. For more information, see CreateDBCluster.

iv_port TYPE /AWS1/NEPINTEGEROPTIONAL /AWS1/NEPINTEGEROPTIONAL

The port number on which the database accepts connections.

Not applicable. The port is managed by the DB cluster. For more information, see CreateDBCluster.

Default: 8182

Type: Integer

iv_multiaz TYPE /AWS1/NEPBOOLEANOPTIONAL /AWS1/NEPBOOLEANOPTIONAL

Specifies if the DB instance is a Multi-AZ deployment. You can't set the AvailabilityZone parameter if the MultiAZ parameter is set to true.

iv_engineversion TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

The version number of the database engine to use. Currently, setting this parameter has no effect.

iv_autominorversionupgrade TYPE /AWS1/NEPBOOLEANOPTIONAL /AWS1/NEPBOOLEANOPTIONAL

Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.

Default: true

iv_licensemodel TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

License model information for this DB instance.

Valid values: license-included | bring-your-own-license | general-public-license

iv_iops TYPE /AWS1/NEPINTEGEROPTIONAL /AWS1/NEPINTEGEROPTIONAL

The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for the DB instance.

iv_optiongroupname TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

(Not supported by Neptune)

iv_charactersetname TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

(Not supported by Neptune)

iv_publiclyaccessible TYPE /AWS1/NEPBOOLEANOPTIONAL /AWS1/NEPBOOLEANOPTIONAL

Indicates whether the DB instance is publicly accessible.

When the DB instance is publicly accessible and you connect from outside of the DB instance's virtual private cloud (VPC), its Domain Name System (DNS) endpoint resolves to the public IP address. When you connect from within the same VPC as the DB instance, the endpoint resolves to the private IP address. Access to the DB instance is ultimately controlled by the security group it uses. That public access isn't permitted if the security group assigned to the DB cluster doesn't permit it.

When the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.

it_tags TYPE /AWS1/CL_NEPTAG=>TT_TAGLIST TT_TAGLIST

The tags to assign to the new instance.

iv_storagetype TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

Not applicable. In Neptune the storage type is managed at the DB Cluster level.

iv_tdecredentialarn TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

The ARN from the key store with which to associate the instance for TDE encryption.

iv_tdecredentialpassword TYPE /AWS1/NEPSENSITIVESTRING /AWS1/NEPSENSITIVESTRING

The password for the given ARN from the key store in order to access the device.

iv_storageencrypted TYPE /AWS1/NEPBOOLEANOPTIONAL /AWS1/NEPBOOLEANOPTIONAL

Specifies whether the DB instance is encrypted.

Not applicable. The encryption for DB instances is managed by the DB cluster. For more information, see CreateDBCluster.

Default: false

iv_kmskeyid TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

The Amazon KMS key identifier for an encrypted DB instance.

The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a DB instance with the same Amazon account that owns the KMS encryption key used to encrypt the new DB instance, then you can use the KMS key alias instead of the ARN for the KM encryption key.

Not applicable. The KMS key identifier is managed by the DB cluster. For more information, see CreateDBCluster.

If the StorageEncrypted parameter is true, and you do not specify a value for the KmsKeyId parameter, then Amazon Neptune will use your default encryption key. Amazon KMS creates the default encryption key for your Amazon account. Your Amazon account has a different default encryption key for each Amazon Region.

iv_domain TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

Specify the Active Directory Domain to create the instance in.

iv_copytagstosnapshot TYPE /AWS1/NEPBOOLEANOPTIONAL /AWS1/NEPBOOLEANOPTIONAL

True to copy all tags from the DB instance to snapshots of the DB instance, and otherwise false. The default is false.

iv_monitoringinterval TYPE /AWS1/NEPINTEGEROPTIONAL /AWS1/NEPINTEGEROPTIONAL

The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0.

If MonitoringRoleArn is specified, then you must also set MonitoringInterval to a value other than 0.

Valid Values: 0, 1, 5, 10, 15, 30, 60

iv_monitoringrolearn TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

The ARN for the IAM role that permits Neptune to send enhanced monitoring metrics to Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess.

If MonitoringInterval is set to a value other than 0, then you must supply a MonitoringRoleArn value.

iv_domainiamrolename TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

Specify the name of the IAM role to be used when making API calls to the Directory Service.

iv_promotiontier TYPE /AWS1/NEPINTEGEROPTIONAL /AWS1/NEPINTEGEROPTIONAL

A value that specifies the order in which an Read Replica is promoted to the primary instance after a failure of the existing primary instance.

Default: 1

Valid Values: 0 - 15

iv_timezone TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

The time zone of the DB instance.

iv_enbiamdatabaseauthntctn TYPE /AWS1/NEPBOOLEANOPTIONAL /AWS1/NEPBOOLEANOPTIONAL

Not supported by Neptune (ignored).

iv_enableperformanceinsights TYPE /AWS1/NEPBOOLEANOPTIONAL /AWS1/NEPBOOLEANOPTIONAL

(Not supported by Neptune)

iv_performanceinsightskmsk00 TYPE /AWS1/NEPSTRING /AWS1/NEPSTRING

(Not supported by Neptune)

it_enablecloudwatchlogsexp TYPE /AWS1/CL_NEPLOGTYPELIST_W=>TT_LOGTYPELIST TT_LOGTYPELIST

The list of log types that need to be enabled for exporting to CloudWatch Logs.

iv_deletionprotection TYPE /AWS1/NEPBOOLEANOPTIONAL /AWS1/NEPBOOLEANOPTIONAL

A value that indicates whether the DB instance has deletion protection enabled. The database can't be deleted when deletion protection is enabled. By default, deletion protection is disabled. See Deleting a DB Instance.

DB instances in a DB cluster can be deleted even when deletion protection is enabled in their parent DB cluster.

RETURNING

oo_output TYPE REF TO /aws1/cl_nepcreatedbinstresult /AWS1/CL_NEPCREATEDBINSTRESULT

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->/aws1/if_nep~createdbinstance(
  it_dbsecuritygroups = VALUE /aws1/cl_nepdbsecgrpnamelist_w=>tt_dbsecuritygroupnamelist(
    ( new /aws1/cl_nepdbsecgrpnamelist_w( |string| ) )
  )
  it_enablecloudwatchlogsexp = VALUE /aws1/cl_neplogtypelist_w=>tt_logtypelist(
    ( new /aws1/cl_neplogtypelist_w( |string| ) )
  )
  it_tags = VALUE /aws1/cl_neptag=>tt_taglist(
    (
      new /aws1/cl_neptag(
        iv_key = |string|
        iv_value = |string|
      )
    )
  )
  it_vpcsecuritygroupids = VALUE /aws1/cl_nepvpcsecgrpidlist_w=>tt_vpcsecuritygroupidlist(
    ( new /aws1/cl_nepvpcsecgrpidlist_w( |string| ) )
  )
  iv_allocatedstorage = 123
  iv_autominorversionupgrade = ABAP_TRUE
  iv_availabilityzone = |string|
  iv_backupretentionperiod = 123
  iv_charactersetname = |string|
  iv_copytagstosnapshot = ABAP_TRUE
  iv_dbclusteridentifier = |string|
  iv_dbinstanceclass = |string|
  iv_dbinstanceidentifier = |string|
  iv_dbname = |string|
  iv_dbparametergroupname = |string|
  iv_dbsubnetgroupname = |string|
  iv_deletionprotection = ABAP_TRUE
  iv_domain = |string|
  iv_domainiamrolename = |string|
  iv_enableperformanceinsights = ABAP_TRUE
  iv_enbiamdatabaseauthntctn = ABAP_TRUE
  iv_engine = |string|
  iv_engineversion = |string|
  iv_iops = 123
  iv_kmskeyid = |string|
  iv_licensemodel = |string|
  iv_masterusername = |string|
  iv_masteruserpassword = |string|
  iv_monitoringinterval = 123
  iv_monitoringrolearn = |string|
  iv_multiaz = ABAP_TRUE
  iv_optiongroupname = |string|
  iv_performanceinsightskmsk00 = |string|
  iv_port = 123
  iv_preferredbackupwindow = |string|
  iv_preferredmaintenancewin00 = |string|
  iv_promotiontier = 123
  iv_publiclyaccessible = ABAP_TRUE
  iv_storageencrypted = ABAP_TRUE
  iv_storagetype = |string|
  iv_tdecredentialarn = |string|
  iv_tdecredentialpassword = |string|
  iv_timezone = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_dbinstance = lo_result->get_dbinstance( ).
  IF lo_dbinstance IS NOT INITIAL.
    lv_string = lo_dbinstance->get_dbinstanceidentifier( ).
    lv_string = lo_dbinstance->get_dbinstanceclass( ).
    lv_string = lo_dbinstance->get_engine( ).
    lv_string = lo_dbinstance->get_dbinstancestatus( ).
    lv_string = lo_dbinstance->get_masterusername( ).
    lv_string = lo_dbinstance->get_dbname( ).
    lo_endpoint = lo_dbinstance->get_endpoint( ).
    IF lo_endpoint IS NOT INITIAL.
      lv_string = lo_endpoint->get_address( ).
      lv_integer = lo_endpoint->get_port( ).
      lv_string = lo_endpoint->get_hostedzoneid( ).
    ENDIF.
    lv_integer = lo_dbinstance->get_allocatedstorage( ).
    lv_tstamp = lo_dbinstance->get_instancecreatetime( ).
    lv_string = lo_dbinstance->get_preferredbackupwindow( ).
    lv_integer = lo_dbinstance->get_backupretentionperiod( ).
    LOOP AT lo_dbinstance->get_dbsecuritygroups( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        lv_string = lo_row_1->get_dbsecuritygroupname( ).
        lv_string = lo_row_1->get_status( ).
      ENDIF.
    ENDLOOP.
    LOOP AT lo_dbinstance->get_vpcsecuritygroups( ) into lo_row_2.
      lo_row_3 = lo_row_2.
      IF lo_row_3 IS NOT INITIAL.
        lv_string = lo_row_3->get_vpcsecuritygroupid( ).
        lv_string = lo_row_3->get_status( ).
      ENDIF.
    ENDLOOP.
    LOOP AT lo_dbinstance->get_dbparametergroups( ) into lo_row_4.
      lo_row_5 = lo_row_4.
      IF lo_row_5 IS NOT INITIAL.
        lv_string = lo_row_5->get_dbparametergroupname( ).
        lv_string = lo_row_5->get_parameterapplystatus( ).
      ENDIF.
    ENDLOOP.
    lv_string = lo_dbinstance->get_availabilityzone( ).
    lo_dbsubnetgroup = lo_dbinstance->get_dbsubnetgroup( ).
    IF lo_dbsubnetgroup IS NOT INITIAL.
      lv_string = lo_dbsubnetgroup->get_dbsubnetgroupname( ).
      lv_string = lo_dbsubnetgroup->get_dbsubnetgroupdescription( ).
      lv_string = lo_dbsubnetgroup->get_vpcid( ).
      lv_string = lo_dbsubnetgroup->get_subnetgroupstatus( ).
      LOOP AT lo_dbsubnetgroup->get_subnets( ) into lo_row_6.
        lo_row_7 = lo_row_6.
        IF lo_row_7 IS NOT INITIAL.
          lv_string = lo_row_7->get_subnetidentifier( ).
          lo_availabilityzone = lo_row_7->get_subnetavailabilityzone( ).
          IF lo_availabilityzone IS NOT INITIAL.
            lv_string = lo_availabilityzone->get_name( ).
          ENDIF.
          lv_string = lo_row_7->get_subnetstatus( ).
        ENDIF.
      ENDLOOP.
      lv_string = lo_dbsubnetgroup->get_dbsubnetgrouparn( ).
    ENDIF.
    lv_string = lo_dbinstance->get_preferredmaintenancewi00( ).
    lo_pendingmodifiedvalues = lo_dbinstance->get_pendingmodifiedvalues( ).
    IF lo_pendingmodifiedvalues IS NOT INITIAL.
      lv_string = lo_pendingmodifiedvalues->get_dbinstanceclass( ).
      lv_integeroptional = lo_pendingmodifiedvalues->get_allocatedstorage( ).
      lv_string = lo_pendingmodifiedvalues->get_masteruserpassword( ).
      lv_integeroptional = lo_pendingmodifiedvalues->get_port( ).
      lv_integeroptional = lo_pendingmodifiedvalues->get_backupretentionperiod( ).
      lv_booleanoptional = lo_pendingmodifiedvalues->get_multiaz( ).
      lv_string = lo_pendingmodifiedvalues->get_engineversion( ).
      lv_string = lo_pendingmodifiedvalues->get_licensemodel( ).
      lv_integeroptional = lo_pendingmodifiedvalues->get_iops( ).
      lv_string = lo_pendingmodifiedvalues->get_dbinstanceidentifier( ).
      lv_string = lo_pendingmodifiedvalues->get_storagetype( ).
      lv_string = lo_pendingmodifiedvalues->get_cacertificateidentifier( ).
      lv_string = lo_pendingmodifiedvalues->get_dbsubnetgroupname( ).
      lo_pendingcloudwatchlogsex = lo_pendingmodifiedvalues->get_pendingcloudwatchlogsexp( ).
      IF lo_pendingcloudwatchlogsex IS NOT INITIAL.
        LOOP AT lo_pendingcloudwatchlogsex->get_logtypestoenable( ) into lo_row_8.
          lo_row_9 = lo_row_8.
          IF lo_row_9 IS NOT INITIAL.
            lv_string = lo_row_9->get_value( ).
          ENDIF.
        ENDLOOP.
        LOOP AT lo_pendingcloudwatchlogsex->get_logtypestodisable( ) into lo_row_8.
          lo_row_9 = lo_row_8.
          IF lo_row_9 IS NOT INITIAL.
            lv_string = lo_row_9->get_value( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDIF.
    lv_tstamp = lo_dbinstance->get_latestrestorabletime( ).
    lv_boolean = lo_dbinstance->get_multiaz( ).
    lv_string = lo_dbinstance->get_engineversion( ).
    lv_boolean = lo_dbinstance->get_autominorversionupgrade( ).
    lv_string = lo_dbinstance->get_readrplsourcedbinstid( ).
    LOOP AT lo_dbinstance->get_readreplicadbinstanceids( ) 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.
    LOOP AT lo_dbinstance->get_readreplicadbclusterids( ) into lo_row_12.
      lo_row_13 = lo_row_12.
      IF lo_row_13 IS NOT INITIAL.
        lv_string = lo_row_13->get_value( ).
      ENDIF.
    ENDLOOP.
    lv_string = lo_dbinstance->get_licensemodel( ).
    lv_integeroptional = lo_dbinstance->get_iops( ).
    LOOP AT lo_dbinstance->get_optiongroupmemberships( ) into lo_row_14.
      lo_row_15 = lo_row_14.
      IF lo_row_15 IS NOT INITIAL.
        lv_string = lo_row_15->get_optiongroupname( ).
        lv_string = lo_row_15->get_status( ).
      ENDIF.
    ENDLOOP.
    lv_string = lo_dbinstance->get_charactersetname( ).
    lv_string = lo_dbinstance->get_secondaryaz( ).
    lv_boolean = lo_dbinstance->get_publiclyaccessible( ).
    LOOP AT lo_dbinstance->get_statusinfos( ) into lo_row_16.
      lo_row_17 = lo_row_16.
      IF lo_row_17 IS NOT INITIAL.
        lv_string = lo_row_17->get_statustype( ).
        lv_boolean = lo_row_17->get_normal( ).
        lv_string = lo_row_17->get_status( ).
        lv_string = lo_row_17->get_message( ).
      ENDIF.
    ENDLOOP.
    lv_string = lo_dbinstance->get_storagetype( ).
    lv_string = lo_dbinstance->get_tdecredentialarn( ).
    lv_integer = lo_dbinstance->get_dbinstanceport( ).
    lv_string = lo_dbinstance->get_dbclusteridentifier( ).
    lv_boolean = lo_dbinstance->get_storageencrypted( ).
    lv_string = lo_dbinstance->get_kmskeyid( ).
    lv_string = lo_dbinstance->get_dbiresourceid( ).
    lv_string = lo_dbinstance->get_cacertificateidentifier( ).
    LOOP AT lo_dbinstance->get_domainmemberships( ) into lo_row_18.
      lo_row_19 = lo_row_18.
      IF lo_row_19 IS NOT INITIAL.
        lv_string = lo_row_19->get_domain( ).
        lv_string = lo_row_19->get_status( ).
        lv_string = lo_row_19->get_fqdn( ).
        lv_string = lo_row_19->get_iamrolename( ).
      ENDIF.
    ENDLOOP.
    lv_boolean = lo_dbinstance->get_copytagstosnapshot( ).
    lv_integeroptional = lo_dbinstance->get_monitoringinterval( ).
    lv_string = lo_dbinstance->get_enhancedmonresourcearn( ).
    lv_string = lo_dbinstance->get_monitoringrolearn( ).
    lv_integeroptional = lo_dbinstance->get_promotiontier( ).
    lv_string = lo_dbinstance->get_dbinstancearn( ).
    lv_string = lo_dbinstance->get_timezone( ).
    lv_boolean = lo_dbinstance->get_iamdatabaseauthntctnenbd( ).
    lv_booleanoptional = lo_dbinstance->get_performanceinsightsenbd( ).
    lv_string = lo_dbinstance->get_performanceinsightskms00( ).
    LOOP AT lo_dbinstance->get_enabledcloudwatchlogsexp( ) into lo_row_8.
      lo_row_9 = lo_row_8.
      IF lo_row_9 IS NOT INITIAL.
        lv_string = lo_row_9->get_value( ).
      ENDIF.
    ENDLOOP.
    lv_booleanoptional = lo_dbinstance->get_deletionprotection( ).
  ENDIF.
ENDIF.