{
 "additionalProperties": false,
 "conditionalCreateOnlyProperties": [
  "/properties/AutoMinorVersionUpgrade",
  "/properties/AvailabilityZone",
  "/properties/BackupRetentionPeriod",
  "/properties/DBClusterSnapshotIdentifier",
  "/properties/DBParameterGroupName",
  "/properties/DBSnapshotIdentifier",
  "/properties/Engine",
  "/properties/MultiAZ",
  "/properties/PerformanceInsightsKMSKeyId",
  "/properties/PreferredMaintenanceWindow",
  "/properties/RestoreTime",
  "/properties/SourceDBClusterIdentifier",
  "/properties/SourceDBInstanceAutomatedBackupsArn",
  "/properties/SourceDBInstanceIdentifier",
  "/properties/SourceDbiResourceId",
  "/properties/StorageType",
  "/properties/UseLatestRestorableTime"
 ],
 "createOnlyProperties": [
  "/properties/BackupTarget",
  "/properties/CharacterSetName",
  "/properties/CustomIAMInstanceProfile",
  "/properties/DBClusterIdentifier",
  "/properties/DBInstanceIdentifier",
  "/properties/DBName",
  "/properties/DBSubnetGroupName",
  "/properties/DBSystemId",
  "/properties/KmsKeyId",
  "/properties/MasterUsername",
  "/properties/NcharCharacterSetName",
  "/properties/SourceRegion",
  "/properties/StorageEncrypted",
  "/properties/Timezone"
 ],
 "definitions": {
  "AdditionalStorageVolume": {
   "additionalProperties": false,
   "properties": {
    "AllocatedStorage": {
     "pattern": "^[0-9]*$",
     "type": "string"
    },
    "Iops": {
     "type": "integer"
    },
    "MaxAllocatedStorage": {
     "type": "integer"
    },
    "StorageThroughput": {
     "type": "integer"
    },
    "StorageType": {
     "type": "string"
    },
    "VolumeName": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "CertificateDetails": {
   "additionalProperties": false,
   "properties": {
    "CAIdentifier": {
     "type": "string"
    },
    "ValidTill": {
     "format": "date-time",
     "type": "string"
    }
   },
   "type": "object"
  },
  "DBInstanceRole": {
   "additionalProperties": false,
   "properties": {
    "FeatureName": {
     "type": "string"
    },
    "RoleArn": {
     "format": "AWS::IAM::Role.Arn",
     "type": "string"
    }
   },
   "required": [
    "FeatureName",
    "RoleArn"
   ],
   "type": "object"
  },
  "DBInstanceStatusInfo": {
   "additionalProperties": false,
   "properties": {
    "Message": {
     "type": "string"
    },
    "Normal": {
     "type": "boolean"
    },
    "Status": {
     "type": "string"
    },
    "StatusType": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "Endpoint": {
   "additionalProperties": false,
   "properties": {
    "Address": {
     "type": "string"
    },
    "HostedZoneId": {
     "type": "string"
    },
    "Port": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "MasterUserSecret": {
   "additionalProperties": false,
   "properties": {
    "KmsKeyId": {
     "anyOf": [
      {
       "format": "AWS::KMS::Key.Arn"
      },
      {
       "format": "AWS::KMS::Key.Id"
      },
      {
       "format": "AWS::KMS::Alias.AliasName"
      }
     ],
     "type": "string"
    },
    "SecretArn": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "ProcessorFeature": {
   "additionalProperties": false,
   "properties": {
    "Name": {
     "enum": [
      "coreCount",
      "threadsPerCore"
     ],
     "type": "string"
    },
    "Value": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 0,
     "type": "string"
    }
   },
   "required": [
    "Key"
   ],
   "type": "object"
  }
 },
 "dependentExcluded": {
  "SourceDBInstanceIdentifier": [
   "CharacterSetName",
   "MasterUserPassword",
   "MasterUsername",
   "StorageEncrypted"
  ]
 },
 "deprecatedProperties": [
  "/properties/TdeCredentialArn",
  "/properties/TdeCredentialPassword"
 ],
 "primaryIdentifier": [
  "/properties/DBInstanceIdentifier"
 ],
 "properties": {
  "AdditionalStorageVolumes": {
   "items": {
    "$ref": "#/definitions/AdditionalStorageVolume"
   },
   "type": "array"
  },
  "AllocatedStorage": {
   "pattern": "^[0-9]*$",
   "type": "string"
  },
  "AllowMajorVersionUpgrade": {
   "type": "boolean"
  },
  "ApplyImmediately": {
   "type": "boolean"
  },
  "AssociatedRoles": {
   "items": {
    "$ref": "#/definitions/DBInstanceRole"
   },
   "type": "array"
  },
  "AutoMinorVersionUpgrade": {
   "type": "boolean"
  },
  "AutomaticBackupReplicationKmsKeyId": {
   "type": "string"
  },
  "AutomaticBackupReplicationRegion": {
   "type": "string"
  },
  "AutomaticBackupReplicationRetentionPeriod": {
   "minimum": 1,
   "type": "integer"
  },
  "AutomaticRestartTime": {
   "type": "string"
  },
  "AvailabilityZone": {
   "type": "string"
  },
  "BackupRetentionPeriod": {
   "minimum": 0,
   "type": "integer"
  },
  "BackupTarget": {
   "type": "string"
  },
  "CACertificateIdentifier": {
   "type": "string"
  },
  "CertificateDetails": {
   "$ref": "#/definitions/CertificateDetails"
  },
  "CertificateRotationRestart": {
   "type": "boolean"
  },
  "CharacterSetName": {
   "type": "string"
  },
  "CopyTagsToSnapshot": {
   "type": "boolean"
  },
  "CustomIAMInstanceProfile": {
   "type": "string"
  },
  "DBClusterIdentifier": {
   "type": "string"
  },
  "DBClusterSnapshotIdentifier": {
   "type": "string"
  },
  "DBInstanceArn": {
   "type": "string"
  },
  "DBInstanceClass": {
   "type": "string"
  },
  "DBInstanceIdentifier": {
   "maxLength": 63,
   "minLength": 1,
   "pattern": "^$|^[a-zA-Z]{1}(?:-?[a-zA-Z0-9]){0,62}$",
   "type": "string"
  },
  "DBInstanceStatus": {
   "type": "string"
  },
  "DBName": {
   "type": "string"
  },
  "DBParameterGroupName": {
   "type": "string"
  },
  "DBSecurityGroups": {
   "items": {
    "type": "string"
   },
   "type": "array",
   "uniqueItems": true
  },
  "DBSnapshotIdentifier": {
   "type": "string"
  },
  "DBSubnetGroupName": {
   "type": "string"
  },
  "DBSystemId": {
   "type": "string"
  },
  "DatabaseInsightsMode": {
   "enum": [
    "advanced",
    "standard"
   ],
   "type": "string"
  },
  "DbiResourceId": {
   "type": "string"
  },
  "DedicatedLogVolume": {
   "type": "boolean"
  },
  "DeleteAutomatedBackups": {
   "type": "boolean"
  },
  "DeletionProtection": {
   "type": "boolean"
  },
  "Domain": {
   "type": "string"
  },
  "DomainAuthSecretArn": {
   "type": "string"
  },
  "DomainDnsIps": {
   "items": {
    "type": "string"
   },
   "type": "array"
  },
  "DomainFqdn": {
   "type": "string"
  },
  "DomainIAMRoleName": {
   "type": "string"
  },
  "DomainOu": {
   "type": "string"
  },
  "EnableCloudwatchLogsExports": {
   "items": {
    "type": "string"
   },
   "type": "array"
  },
  "EnableIAMDatabaseAuthentication": {
   "type": "boolean"
  },
  "EnablePerformanceInsights": {
   "type": "boolean"
  },
  "Endpoint": {
   "$ref": "#/definitions/Endpoint"
  },
  "Engine": {
   "type": "string"
  },
  "EngineLifecycleSupport": {
   "type": "string"
  },
  "EngineVersion": {
   "type": "string"
  },
  "InstanceCreateTime": {
   "format": "date-time",
   "type": "string"
  },
  "Iops": {
   "type": "integer"
  },
  "IsStorageConfigUpgradeAvailable": {
   "type": "boolean"
  },
  "KmsKeyId": {
   "anyOf": [
    {
     "format": "AWS::KMS::Key.Arn"
    },
    {
     "format": "AWS::KMS::Key.Id"
    },
    {
     "format": "AWS::KMS::Alias.AliasName"
    }
   ],
   "type": "string"
  },
  "LatestRestorableTime": {
   "format": "date-time",
   "type": "string"
  },
  "LicenseModel": {
   "type": "string"
  },
  "ListenerEndpoint": {
   "$ref": "#/definitions/Endpoint"
  },
  "ManageMasterUserPassword": {
   "type": "boolean"
  },
  "MasterUserAuthenticationType": {
   "enum": [
    "iam-db-auth",
    "password"
   ],
   "type": "string"
  },
  "MasterUserPassword": {
   "type": "string"
  },
  "MasterUserSecret": {
   "$ref": "#/definitions/MasterUserSecret"
  },
  "MasterUsername": {
   "maxLength": 128,
   "minLength": 1,
   "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,127}$",
   "type": "string"
  },
  "MaxAllocatedStorage": {
   "type": "integer"
  },
  "MonitoringInterval": {
   "type": "integer"
  },
  "MonitoringRoleArn": {
   "format": "AWS::IAM::Role.Arn",
   "type": "string"
  },
  "MultiAZ": {
   "type": "boolean"
  },
  "NcharCharacterSetName": {
   "type": "string"
  },
  "NetworkType": {
   "type": "string"
  },
  "OptionGroupName": {
   "type": "string"
  },
  "PercentProgress": {
   "type": "string"
  },
  "PerformanceInsightsKMSKeyId": {
   "type": "string"
  },
  "PerformanceInsightsRetentionPeriod": {
   "enum": [
    7,
    31,
    62,
    93,
    124,
    155,
    186,
    217,
    248,
    279,
    310,
    341,
    372,
    403,
    434,
    465,
    496,
    527,
    558,
    589,
    620,
    651,
    682,
    713,
    731
   ],
   "type": "integer"
  },
  "Port": {
   "pattern": "^\\d*$",
   "type": "string"
  },
  "PreferredBackupWindow": {
   "type": "string"
  },
  "PreferredMaintenanceWindow": {
   "type": "string"
  },
  "ProcessorFeatures": {
   "items": {
    "$ref": "#/definitions/ProcessorFeature"
   },
   "type": "array"
  },
  "PromotionTier": {
   "maximum": 15,
   "minimum": 0,
   "type": "integer"
  },
  "PubliclyAccessible": {
   "type": "boolean"
  },
  "ReadReplicaDBClusterIdentifiers": {
   "items": {
    "type": "string"
   },
   "type": "array"
  },
  "ReadReplicaDBInstanceIdentifiers": {
   "items": {
    "type": "string"
   },
   "type": "array"
  },
  "ReplicaMode": {
   "type": "string"
  },
  "RestoreTime": {
   "format": "date-time",
   "type": "string"
  },
  "ResumeFullAutomationModeTime": {
   "type": "string"
  },
  "SecondaryAvailabilityZone": {
   "type": "string"
  },
  "SourceDBClusterIdentifier": {
   "type": "string"
  },
  "SourceDBInstanceAutomatedBackupsArn": {
   "type": "string"
  },
  "SourceDBInstanceIdentifier": {
   "type": "string"
  },
  "SourceDbiResourceId": {
   "type": "string"
  },
  "SourceRegion": {
   "type": "string"
  },
  "StatusInfos": {
   "items": {
    "$ref": "#/definitions/DBInstanceStatusInfo"
   },
   "type": "array"
  },
  "StorageEncrypted": {
   "type": "boolean"
  },
  "StorageThroughput": {
   "type": "integer"
  },
  "StorageType": {
   "type": "string"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "type": "array",
   "uniqueItems": false
  },
  "TdeCredentialArn": {
   "type": "string"
  },
  "TdeCredentialPassword": {
   "type": "string"
  },
  "Timezone": {
   "type": "string"
  },
  "UseDefaultProcessorFeatures": {
   "type": "boolean"
  },
  "UseLatestRestorableTime": {
   "type": "boolean"
  },
  "VPCSecurityGroups": {
   "items": {
    "type": "string"
   },
   "type": "array",
   "uniqueItems": true
  }
 },
 "propertyTransform": {
  "/properties/DBClusterIdentifier": "$lowercase(DBClusterIdentifier)",
  "/properties/DBClusterSnapshotIdentifier": "$lowercase(DBClusterSnapshotIdentifier)",
  "/properties/DBInstanceIdentifier": "$lowercase(DBInstanceIdentifier)",
  "/properties/DBName": "$lowercase(DBName) $OR $uppercase(DBName)",
  "/properties/DBParameterGroupName": "$lowercase(DBParameterGroupName)",
  "/properties/DBSnapshotIdentifier": "$lowercase(DBSnapshotIdentifier)",
  "/properties/DBSubnetGroupName": "$lowercase(DBSubnetGroupName)",
  "/properties/DBSystemId": "$uppercase(DBSystemId)",
  "/properties/Engine": "$lowercase(Engine)",
  "/properties/EngineVersion": "$join([$string(EngineVersion), \".*\"])",
  "/properties/KmsKeyId": "$join([\"arn:.+?:kms:.+?:.+?:key\\/\", KmsKeyId])",
  "/properties/MasterUserSecret/KmsKeyId": "$join([\"arn:.+?:kms:.+?:.+?:key\\/\", MasterUserSecret.KmsKeyId])",
  "/properties/NetworkType": "$lowercase(NetworkType)",
  "/properties/OptionGroupName": "$lowercase(OptionGroupName)",
  "/properties/PerformanceInsightsKMSKeyId": "$join([\"arn:.+?:kms:.+?:.+?:key\\/\", PerformanceInsightsKMSKeyId])",
  "/properties/PreferredMaintenanceWindow": "$lowercase(PreferredMaintenanceWindow)",
  "/properties/SourceDBInstanceAutomatedBackupsArn": "$lowercase(SourceDBInstanceAutomatedBackupsArn)",
  "/properties/SourceDBInstanceIdentifier": "$lowercase(SourceDBInstanceIdentifier)",
  "/properties/StorageType": "$lowercase(StorageType)"
 },
 "readOnlyProperties": [
  "/properties/AutomaticRestartTime",
  "/properties/CertificateDetails",
  "/properties/CertificateDetails/CAIdentifier",
  "/properties/CertificateDetails/ValidTill",
  "/properties/Endpoint",
  "/properties/Endpoint/Address",
  "/properties/Endpoint/Port",
  "/properties/Endpoint/HostedZoneId",
  "/properties/DbiResourceId",
  "/properties/DBInstanceArn",
  "/properties/DBInstanceStatus",
  "/properties/InstanceCreateTime",
  "/properties/IsStorageConfigUpgradeAvailable",
  "/properties/LatestRestorableTime",
  "/properties/ListenerEndpoint",
  "/properties/ListenerEndpoint/Address",
  "/properties/ListenerEndpoint/Port",
  "/properties/ListenerEndpoint/HostedZoneId",
  "/properties/MasterUserSecret/SecretArn",
  "/properties/PercentProgress",
  "/properties/ReadReplicaDBClusterIdentifiers",
  "/properties/ReadReplicaDBInstanceIdentifiers",
  "/properties/ResumeFullAutomationModeTime",
  "/properties/SecondaryAvailabilityZone",
  "/properties/StatusInfos"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::RDS::DBInstance",
 "writeOnlyProperties": [
  "/properties/AllowMajorVersionUpgrade",
  "/properties/AutomaticBackupReplicationKmsKeyId",
  "/properties/CertificateRotationRestart",
  "/properties/DBSnapshotIdentifier",
  "/properties/DeleteAutomatedBackups",
  "/properties/MasterUserAuthenticationType",
  "/properties/MasterUserPassword",
  "/properties/RestoreTime",
  "/properties/SourceDBInstanceAutomatedBackupsArn",
  "/properties/SourceDBInstanceIdentifier",
  "/properties/SourceDbiResourceId",
  "/properties/SourceRegion",
  "/properties/TdeCredentialPassword",
  "/properties/UseDefaultProcessorFeatures",
  "/properties/UseLatestRestorableTime",
  "/properties/ApplyImmediately"
 ]
}
