

def validate(self):
    preferred_azs = self.properties.get('PreferredAvailabilityZones')
    if ((self is not None) and isinstance(preferred_azs, list) and (len(preferred_azs) > 1)):
        if (self.properties.get('AZMode') != 'cross-az'):
            raise ValueError('AZMode must be "cross-az" if more than one availability zone is specified in PreferredAvailabilityZones: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-cache-cluster.html#cfn-elasticache-cachecluster-azmode')
    return True

dataset/ETHPy150Open cloudtools/troposphere/troposphere/elasticache.py CacheCluster.validate/VarMisuse@24/34 `preferred_azs`->`self`