Skip to content

create_custom_db_engine_version

create_custom_db_engine_version(
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    engine: Optional[CustomEngineName] = None,
    engine_version: Optional[CustomEngineVersion] = None,
    database_installation_files_s3_bucket_name: Optional[BucketName] = None,
    database_installation_files_s3_prefix: Optional[String255] = None,
    database_installation_files: Optional[StringList] = None,
    image_id: Optional[String255] = None,
    kms_key_id: Optional[KmsKeyIdOrArn] = None,
    source_custom_db_engine_version_identifier: Optional[String255] = None,
    use_aws_provided_latest_image: Optional[BooleanOptional] = None,
    description: Optional[Description] = None,
    manifest: Optional[CustomDBEngineVersionManifest] = None,
    tags: Optional[TagList] = None,
) -> DBEngineVersion

Creates a custom DB engine version (CEV).

Parameters:

  • engine (Optional[CustomEngineName], default: None ) –

    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

    • custom-sqlserver-web

    • custom-sqlserver-dev

    RDS for SQL Server supports the following values:

    • sqlserver-ee (Bring Your Own Media)

    • sqlserver-se (Bring Your Own Media)

    • sqlserver-dev-ee

  • engine_version (Optional[CustomEngineVersion], default: None ) –

    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 Custom for SQL Server and RDS for SQL Server sqlserver-dev-ee, 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.

    For RDS for SQL Server Bring Your Own Media (sqlserver-ee, sqlserver-se), specify the RDS engine version that you want to use. For example, 16.00.4175.1.v1.

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

  • database_installation_files_s3_bucket_name (Optional[BucketName], default: None ) –

    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.

  • database_installation_files_s3_prefix (Optional[String255], default: None ) –

    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.

  • database_installation_files (Optional[StringList], default: None ) –

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

    For RDS for SQL Server Bring Your Own Media (sqlserver-ee, sqlserver-se), provide the SQL Server RTM ISO file once per major version and edition combination. Minor versions reuse the same file.

  • image_id (Optional[String255], default: None ) –

    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.

  • kms_key_id (Optional[KmsKeyIdOrArn], default: None ) –

    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.

  • source_custom_db_engine_version_identifier (Optional[String255], default: None ) –

    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.

  • use_aws_provided_latest_image (Optional[BooleanOptional], default: None ) –

    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.

  • description (Optional[Description], default: None ) –

    An optional description of your CEV.

  • manifest (Optional[CustomDBEngineVersionManifest], default: None ) –

    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.

Raises:

Source code in docs_src/capo_rds/_services/rds.py
def create_custom_db_engine_version(
    self,
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    engine: Optional["capo_rds.types.custom_engine_name.CustomEngineName"] = None,
    engine_version: Optional[
        "capo_rds.types.custom_engine_version.CustomEngineVersion"
    ] = None,
    database_installation_files_s3_bucket_name: Optional[
        "capo_rds.types.bucket_name.BucketName"
    ] = None,
    database_installation_files_s3_prefix: Optional[
        "capo_rds.types.string255.String255"
    ] = None,
    database_installation_files: Optional[
        "capo_rds.types.string_list.StringList"
    ] = None,
    image_id: Optional["capo_rds.types.string255.String255"] = None,
    kms_key_id: Optional["capo_rds.types.kms_key_id_or_arn.KmsKeyIdOrArn"] = None,
    source_custom_db_engine_version_identifier: Optional[
        "capo_rds.types.string255.String255"
    ] = None,
    use_aws_provided_latest_image: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    description: Optional["capo_rds.types.description.Description"] = None,
    manifest: Optional[
        "capo_rds.types.custom_db_engine_version_manifest.CustomDBEngineVersionManifest"
    ] = None,
    tags: Optional["capo_rds.types.tag_list.TagList"] = None,
) -> "capo_rds.types.db_engine_version.DBEngineVersion":
    """<p>Creates a custom DB engine version (CEV).</p>

    Args:
        engine: <p>The database engine.</p> <p>RDS Custom for Oracle supports the following values:</p> <ul> <li> <p> <code>custom-oracle-ee</code> </p> </li> <li> <p> <code>custom-oracle-ee-cdb</code> </p> </li> <li> <p> <code>custom-oracle-se2</code> </p> </li> <li> <p> <code>custom-oracle-se2-cdb</code> </p> </li> </ul> <p>RDS Custom for SQL Server supports the following values:</p> <ul> <li> <p> <code>custom-sqlserver-ee</code> </p> </li> <li> <p> <code>custom-sqlserver-se</code> </p> </li> <li> <p> <code>custom-sqlserver-web</code> </p> </li> <li> <p> <code>custom-sqlserver-dev</code> </p> </li> </ul> <p>RDS for SQL Server supports the following values:</p> <ul> <li> <p> <code>sqlserver-ee</code> (Bring Your Own Media)</p> </li> <li> <p> <code>sqlserver-se</code> (Bring Your Own Media)</p> </li> <li> <p> <code>sqlserver-dev-ee</code> </p> </li> </ul>
        engine_version: <p>The name of your custom engine version (CEV).</p> <p>For RDS Custom for Oracle, the name format is <code>19.*customized_string*</code>. For example, a valid CEV name is <code>19.my_cev1</code>.</p> <p>For RDS Custom for SQL Server and RDS for SQL Server <code>sqlserver-dev-ee</code>, the name format is <code>*major_engine_version*.*minor_engine_version*.*customized_string*</code>. For example, a valid CEV name is <code>16.00.4215.2.my_cev1</code>.</p> <p>For RDS for SQL Server Bring Your Own Media (<code>sqlserver-ee</code>, <code>sqlserver-se</code>), specify the RDS engine version that you want to use. For example, <code>16.00.4175.1.v1</code>.</p> <p>The CEV name is unique per customer per Amazon Web Services Regions.</p>
        database_installation_files_s3_bucket_name: <p>The name of an Amazon S3 bucket that contains database installation files for your CEV. For example, a valid bucket name is <code>my-custom-installation-files</code>.</p>
        database_installation_files_s3_prefix: <p>The Amazon S3 directory that contains the database installation files for your CEV. For example, a valid bucket name is <code>123456789012/cev1</code>. If this setting isn't specified, no prefix is assumed.</p>
        database_installation_files: <p>The database installation files (ISO and EXE) uploaded to Amazon S3 for your database engine version to import to Amazon RDS.</p> <p>For RDS for SQL Server Bring Your Own Media (<code>sqlserver-ee</code>, <code>sqlserver-se</code>), provide the SQL Server RTM ISO file once per major version and edition combination. Minor versions reuse the same file.</p>
        image_id: <p>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 <a href="https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeDBEngineVersions.html">DescribeDBEngineVersions</a> operation.</p>
        kms_key_id: <p>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.</p> <p>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 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html#create-symmetric-cmk"> Creating a symmetric encryption KMS key</a> in the <i>Amazon Web Services Key Management Service Developer Guide</i>.</p> <p>You can choose the same symmetric encryption key when you create a CEV and a DB instance, or choose different keys.</p>
        source_custom_db_engine_version_identifier: <p>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 <code>Source</code> or <code>UseAwsProvidedLatestImage</code>. You can't specify a different JSON manifest when you specify <code>SourceCustomDbEngineVersionIdentifier</code>.</p>
        use_aws_provided_latest_image: <p>Specifies whether to use the latest service-provided Amazon Machine Image (AMI) for the CEV. If you specify <code>UseAwsProvidedLatestImage</code>, you can't also specify <code>ImageId</code>.</p>
        description: <p>An optional description of your CEV.</p>
        manifest: <p>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.</p> <p>The following JSON fields are valid:</p> <dl> <dt>MediaImportTemplateVersion</dt> <dd> <p>Version of the CEV manifest. The date is in the format <code>YYYY-MM-DD</code>.</p> </dd> <dt>databaseInstallationFileNames</dt> <dd> <p>Ordered list of installation files for the CEV.</p> </dd> <dt>opatchFileNames</dt> <dd> <p>Ordered list of OPatch installers used for the Oracle DB engine.</p> </dd> <dt>psuRuPatchFileNames</dt> <dd> <p>The PSU and RU patches for this CEV.</p> </dd> <dt>OtherPatchFileNames</dt> <dd> <p>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.</p> </dd> </dl> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.html#custom-cev.preparing.manifest"> Creating the CEV manifest</a> in the <i>Amazon RDS User Guide</i>.</p>

    Raises:
        capo_rds.errors.create_custom_db_engine_version_fault.CreateCustomDBEngineVersionFault: <p>An error occurred while trying to create the CEV.</p>
        capo_rds.errors.custom_db_engine_version_already_exists_fault.CustomDBEngineVersionAlreadyExistsFault: <p>A CEV with the specified name already exists.</p>
        capo_rds.errors.custom_db_engine_version_not_found_fault.CustomDBEngineVersionNotFoundFault: <p>The specified CEV was not found.</p>
        capo_rds.errors.custom_db_engine_version_quota_exceeded_fault.CustomDBEngineVersionQuotaExceededFault: <p>You have exceeded your CEV quota.</p>
        capo_rds.errors.ec2_image_properties_not_supported_fault.Ec2ImagePropertiesNotSupportedFault: <p>The AMI configuration prerequisite has not been met.</p>
        capo_rds.errors.invalid_custom_db_engine_version_state_fault.InvalidCustomDBEngineVersionStateFault: <p>You can't delete the CEV.</p>
        capo_rds.errors.kms_key_not_accessible_fault.KMSKeyNotAccessibleFault: <p>An error occurred accessing an Amazon Web Services KMS key.</p>
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_rds.types.create_custom_db_engine_version_message.CreateCustomDBEngineVersionMessage]",
    ) -> OperationResponse["capo_rds.types.db_engine_version.DBEngineVersion"]:
        import capo_rds._operations.amazon_rd_sv19.create_custom_db_engine_version

        output, http_response = (
            capo_rds._operations.amazon_rd_sv19.create_custom_db_engine_version.create_custom_db_engine_version(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateCustomDBEngineVersion")
    )
    input_: capo_rds.types.create_custom_db_engine_version_message.CreateCustomDBEngineVersionMessage = {}
    if engine is not None:
        input_["engine"] = engine
    if engine_version is not None:
        input_["engine_version"] = engine_version
    if database_installation_files_s3_bucket_name is not None:
        input_["database_installation_files_s3_bucket_name"] = (
            database_installation_files_s3_bucket_name
        )
    if database_installation_files_s3_prefix is not None:
        input_["database_installation_files_s3_prefix"] = (
            database_installation_files_s3_prefix
        )
    if database_installation_files is not None:
        input_["database_installation_files"] = database_installation_files
    if image_id is not None:
        input_["image_id"] = image_id
    if kms_key_id is not None:
        input_["kms_key_id"] = kms_key_id
    if source_custom_db_engine_version_identifier is not None:
        input_["source_custom_db_engine_version_identifier"] = (
            source_custom_db_engine_version_identifier
        )
    if use_aws_provided_latest_image is not None:
        input_["use_aws_provided_latest_image"] = use_aws_provided_latest_image
    if description is not None:
        input_["description"] = description
    if manifest is not None:
        input_["manifest"] = manifest
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output