Immunity protein component of a toxin-immunity protein module, which functions as a cellular contact-dependent growth inhibition (CDI) system. CDI modules allow bacteria to communicate with and inhibit the growth of closely related neighboring bacteria in a contact-dependent fashion. Protects cells against CdiA from the same strain, its cognate toxin protein (PubMed:16109881, PubMed:23882017). Growth inhibition is reversible upon induction of this protein, occurring about 2.5 hours after induction, and requires an energy source (PubMed:19124575). Does not protect against non-cognate CdiA from E.coli strain 563 / UPEC, D.dadantii strain 3937 or Y.pestis strain CO92 (PubMed:21085179). Probably interacts with cognate toxin CdiA.