You should have also included the next verse, which contains the recipient of all these praises:
This blessed plot, this earth, this realm, this England...
Shakespeare praises England repeatedly for its geographical position protected from any danger by the sea which surrounds it LIKE a wall, thus shielding it from those less happier lands.
Richard Vliet Lindabury, in his book A Study of Patriotism in the Elizabethan Drama (1983), shows on p. 159 other such instances in Shakespeare:
As to naval power, it is only necessary, in order to realize its
importance in Elizabethan minds, to look at plays which congratulate
England upon her isolation. Naturally the isolation would have
collapsed if her harbors had been at the mercy of hostile shipping.
Since they were not, Lyly could say with some assurance that the gods
had pitched England out of the world, “as not to bee controlde by
any in the world.’ Shakespeare wrote a number of fine lines upon this theme,
Let us be back’d with God and with the seas
Which He hath given for
fence impregnable
(3 Henry VI, IV.1.43-4)
and again,
That pale, that white-fac’d shore,
Whose foot spurns back the ocean’s roaring tides
And coops from other
lands her islanders, . . .
That water-walled bulwark, still secure
And confident from foreign purposes
(Richard II, II.1.43-9)
Such a use of the expression in the office of with the meaning of serving as, acting as, serving the duty of is dated. Most of the times, it is now used followed by nouns that designate positions of authority or responsibility such as president, director, prime minister, secretary etc.