createCustomDBEngineVersion method

Future<DBEngineVersion> createCustomDBEngineVersion({
  1. required String engine,
  2. required String engineVersion,
  3. List<String>? databaseInstallationFiles,
  4. String? databaseInstallationFilesS3BucketName,
  5. String? databaseInstallationFilesS3Prefix,
  6. String? description,
  7. String? imageId,
  8. String? kMSKeyId,
  9. String? manifest,
  10. String? sourceCustomDbEngineVersionIdentifier,
  11. List<Tag>? tags,
  12. bool? useAwsProvidedLatestImage,
})

Creates a custom DB engine version (CEV).

May throw CreateCustomDBEngineVersionFault. May throw CustomDBEngineVersionAlreadyExistsFault. May throw CustomDBEngineVersionNotFoundFault. May throw CustomDBEngineVersionQuotaExceededFault. May throw Ec2ImagePropertiesNotSupportedFault. May throw InvalidCustomDBEngineVersionStateFault. May throw KMSKeyNotAccessibleFault.

Parameter engine : The database engine.

RDS Custom for Oracle supports the following values:

  • custom-oracle-ee
  • custom-oracle-ee-cdb
  • custom-oracle-se2
  • custom-oracle-se2-cdb
RDS Custom for SQL Server supports the following values:
  • custom-sqlserver-ee
  • custom-sqlserver-se
  • ccustom-sqlserver-web
  • custom-sqlserver-dev
RDS for SQL Server supports only sqlserver-dev-ee.

Parameter engineVersion : The name of your custom engine version (CEV).

For RDS Custom for Oracle, the name format is 19.customized_string. For example, a valid CEV name is 19.my_cev1.

For RDS for SQL Server and RDS Custom for SQL Server, the name format is major engine_version*.minor_engine_version.customized_string. For example, a valid CEV name is 16.00.4215.2.my_cev1.

The CEV name is unique per customer per Amazon Web Services Regions.

Parameter databaseInstallationFiles : The database installation files (ISO and EXE) uploaded to Amazon S3 for your database engine version to import to Amazon RDS.

Parameter databaseInstallationFilesS3BucketName : The name of an Amazon S3 bucket that contains database installation files for your CEV. For example, a valid bucket name is my-custom-installation-files.

Parameter databaseInstallationFilesS3Prefix : The Amazon S3 directory that contains the database installation files for your CEV. For example, a valid bucket name is 123456789012/cev1. If this setting isn't specified, no prefix is assumed.

Parameter description : An optional description of your CEV.

Parameter imageId : The ID of the Amazon Machine Image (AMI). For RDS Custom for SQL Server, an AMI ID is required to create a CEV. For RDS Custom for Oracle, the default is the most recent AMI available, but you can specify an AMI ID that was used in a different Oracle CEV. Find the AMIs used by your CEVs by calling the DescribeDBEngineVersions operation.

Parameter kMSKeyId : The Amazon Web Services KMS key identifier for an encrypted CEV. A symmetric encryption KMS key is required for RDS Custom, but optional for Amazon RDS.

If you have an existing symmetric encryption KMS key in your account, you can use it with RDS Custom. No further action is necessary. If you don't already have a symmetric encryption KMS key in your account, follow the instructions in Creating a symmetric encryption KMS key in the Amazon Web Services Key Management Service Developer Guide.

You can choose the same symmetric encryption key when you create a CEV and a DB instance, or choose different keys.

Parameter manifest : The CEV manifest, which is a JSON document that describes the installation .zip files stored in Amazon S3. Specify the name/value pairs in a file or a quoted string. RDS Custom applies the patches in the order in which they are listed.

The following JSON fields are valid:

MediaImportTemplateVersion
Version of the CEV manifest. The date is in the format YYYY-MM-DD.
databaseInstallationFileNames
Ordered list of installation files for the CEV.
opatchFileNames
Ordered list of OPatch installers used for the Oracle DB engine.
psuRuPatchFileNames
The PSU and RU patches for this CEV.
OtherPatchFileNames
The patches that are not in the list of PSU and RU patches. Amazon RDS applies these patches after applying the PSU and RU patches.
For more information, see Creating the CEV manifest in the Amazon RDS User Guide.

Parameter sourceCustomDbEngineVersionIdentifier : The ARN of a CEV to use as a source for creating a new CEV. You can specify a different Amazon Machine Imagine (AMI) by using either Source or UseAwsProvidedLatestImage. You can't specify a different JSON manifest when you specify SourceCustomDbEngineVersionIdentifier.

Parameter useAwsProvidedLatestImage : Specifies whether to use the latest service-provided Amazon Machine Image (AMI) for the CEV. If you specify UseAwsProvidedLatestImage, you can't also specify ImageId.

Implementation

Future<DBEngineVersion> createCustomDBEngineVersion({
  required String engine,
  required String engineVersion,
  List<String>? databaseInstallationFiles,
  String? databaseInstallationFilesS3BucketName,
  String? databaseInstallationFilesS3Prefix,
  String? description,
  String? imageId,
  String? kMSKeyId,
  String? manifest,
  String? sourceCustomDbEngineVersionIdentifier,
  List<Tag>? tags,
  bool? useAwsProvidedLatestImage,
}) async {
  final $request = <String, String>{
    'Engine': engine,
    'EngineVersion': engineVersion,
    if (databaseInstallationFiles != null)
      if (databaseInstallationFiles.isEmpty)
        'DatabaseInstallationFiles': ''
      else
        for (var i1 = 0; i1 < databaseInstallationFiles.length; i1++)
          'DatabaseInstallationFiles.member.${i1 + 1}':
              databaseInstallationFiles[i1],
    if (databaseInstallationFilesS3BucketName != null)
      'DatabaseInstallationFilesS3BucketName':
          databaseInstallationFilesS3BucketName,
    if (databaseInstallationFilesS3Prefix != null)
      'DatabaseInstallationFilesS3Prefix': databaseInstallationFilesS3Prefix,
    if (description != null) 'Description': description,
    if (imageId != null) 'ImageId': imageId,
    if (kMSKeyId != null) 'KMSKeyId': kMSKeyId,
    if (manifest != null) 'Manifest': manifest,
    if (sourceCustomDbEngineVersionIdentifier != null)
      'SourceCustomDbEngineVersionIdentifier':
          sourceCustomDbEngineVersionIdentifier,
    if (tags != null)
      if (tags.isEmpty)
        'Tags': ''
      else
        for (var i1 = 0; i1 < tags.length; i1++)
          for (var e3 in tags[i1].toQueryMap().entries)
            'Tags.Tag.${i1 + 1}.${e3.key}': e3.value,
    if (useAwsProvidedLatestImage != null)
      'UseAwsProvidedLatestImage': useAwsProvidedLatestImage.toString(),
  };
  final $result = await _protocol.send(
    $request,
    action: 'CreateCustomDBEngineVersion',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'CreateCustomDBEngineVersionResult',
  );
  return DBEngineVersion.fromXml($result);
}