func (t *Template) GetAllAWSRDSDBInstanceResources() map[string]AWSRDSDBInstance {
	results := map[string]AWSRDSDBInstance{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case AWSRDSDBInstance:
			results[name] = resource
		case map[string]interface{}:
			if resType, ok := resource["Type"]; ok {
				if resType == "AWS::RDS::DBInstance" {
					if b, err := json.Marshal(resource); err == nil {
						var result AWSRDSDBInstance
						if err := json.Unmarshal(b, &result); err == nil {
							results[name] = result
						}
					}
				}
			}
		}
	}
	return results
}
GetAllAWSRDSDBInstanceResources retrieves all AWSRDSDBInstance items from an AWS CloudFormation template
package cloudformation
import (
	"encoding/json"
	"errors"
	"fmt"
)
type AWSRDSDBInstance struct {
	AllocatedStorage string `json:"AllocatedStorage,omitempty"`
	AllowMajorVersionUpgrade bool `json:"AllowMajorVersionUpgrade,omitempty"`
	AutoMinorVersionUpgrade bool `json:"AutoMinorVersionUpgrade,omitempty"`
	AvailabilityZone string `json:"AvailabilityZone,omitempty"`
	BackupRetentionPeriod string `json:"BackupRetentionPeriod,omitempty"`
	CharacterSetName string `json:"CharacterSetName,omitempty"`
	CopyTagsToSnapshot bool `json:"CopyTagsToSnapshot,omitempty"`
	DBClusterIdentifier string `json:"DBClusterIdentifier,omitempty"`
	DBInstanceClass string `json:"DBInstanceClass,omitempty"`
	DBInstanceIdentifier string `json:"DBInstanceIdentifier,omitempty"`
	DBName string `json:"DBName,omitempty"`
	DBParameterGroupName string `json:"DBParameterGroupName,omitempty"`
	DBSecurityGroups []string `json:"DBSecurityGroups,omitempty"`
	DBSnapshotIdentifier string `json:"DBSnapshotIdentifier,omitempty"`
	DBSubnetGroupName string `json:"DBSubnetGroupName,omitempty"`
	Domain string `json:"Domain,omitempty"`
	DomainIAMRoleName string `json:"DomainIAMRoleName,omitempty"`
	Engine string `json:"Engine,omitempty"`
	EngineVersion string `json:"EngineVersion,omitempty"`
	Iops int `json:"Iops,omitempty"`
	KmsKeyId string `json:"KmsKeyId,omitempty"`
	LicenseModel string `json:"LicenseModel,omitempty"`
	MasterUserPassword string `json:"MasterUserPassword,omitempty"`
	MasterUsername string `json:"MasterUsername,omitempty"`
	MonitoringInterval int `json:"MonitoringInterval,omitempty"`
	MonitoringRoleArn string `json:"MonitoringRoleArn,omitempty"`
	MultiAZ bool `json:"MultiAZ,omitempty"`
	OptionGroupName string `json:"OptionGroupName,omitempty"`
	Port string `json:"Port,omitempty"`
	PreferredBackupWindow string `json:"PreferredBackupWindow,omitempty"`
	PreferredMaintenanceWindow string `json:"PreferredMaintenanceWindow,omitempty"`
	PubliclyAccessible bool `json:"PubliclyAccessible,omitempty"`
	SourceDBInstanceIdentifier string `json:"SourceDBInstanceIdentifier,omitempty"`
	StorageEncrypted bool `json:"StorageEncrypted,omitempty"`
	StorageType string `json:"StorageType,omitempty"`
	Tags []Tag `json:"Tags,omitempty"`
	Timezone string `json:"Timezone,omitempty"`
	VPCSecurityGroups []string `json:"VPCSecurityGroups,omitempty"`
}
func (r *AWSRDSDBInstance) AWSCloudFormationType() string {
	return "AWS::RDS::DBInstance"
}
func (r *AWSRDSDBInstance) MarshalJSON() ([]byte, error) {
	type Properties AWSRDSDBInstance
	return json.Marshal(&struct {
		Type       string
		Properties Properties
	}{
		Type:       r.AWSCloudFormationType(),
		Properties: (Properties)(*r),
	})
}
func (r *AWSRDSDBInstance) UnmarshalJSON(b []byte) error {
	type Properties AWSRDSDBInstance
	res := &struct {
		Type       string
		Properties *Properties
	}{}
	if err := json.Unmarshal(b, &res); err != nil {
		fmt.Printf("ERROR: %s\n", err)
		return err
	}
	if res.Properties != nil {
		*r = AWSRDSDBInstance(*res.Properties)
	}
	return nil
}