Since this is currently a feature that is not possible with the Static Maps API, I came up with a workaround that achieves a โhole effectโ:
1) Define the outer and inner lines of the polygon without a "fillcolor", like this example: https://maps.googleapis.com/maps/api/staticmap?size=640x640&maptype=roadmap&zoom=16&path=color:0xFF0000AA|weight:3|enc:csr{FcgiLuSm[ rYua@zIvHvCdNcAzKmRhX &path=color:0xFF0000AA|weight:3|enc:mjr{FsjjL{A}D}E|DxAvD~EwD 
2) Create a polygon that removes part of the outer polygon and inner polygon, creating as a packer. Set the weight to zero 'weight = 0' and select the color to fill, as in this example: https://maps.googleapis.com/maps/api/staticmap?size=640x640&maptype=roadmap&zoom=16&&path=color:0x0ea001AA|weight:0|fillcolor:0xFFB6C1BB|enc:csr{FcgiLuSm[ rYua@zIvHvCdNcAzKwIeI {A}D}E| DxAvDu@v \ https://maps.googleapis.com/maps/api/staticmap?size=640x640&maptype=roadmap&zoom=16&&path=color:0x0ea001AA|weight:0|fillcolor:0xFFB6C1BB|enc:csr{FcgiLuSm[ rYua@zIvHvCdNcAzKwIeI {A}D}E| DxAvDu@v \
3) Similar to step 2, create the part that we miss the filled polygon, as in this example: https://maps.googleapis.com/maps/api/staticmap?size=640x640&maptype=roadmap&zoom=16&path=color:0x0ea001AA|weight:0|fillcolor:0xFFB6C1BB|enc:csr{ FcgiLlRiXwIeI_FvDu@v \
4) Finally, connect all the paths together to simulate the desired hole: https://maps.googleapis.com/maps/api/staticmap?size=640x640&maptype=roadmap&zoom=16&path=color:0xFF0000AA|weight:3|enc:csr{FcgiLuSm[ rYua@zIvHvCdNcAzKmRhX &path=color:0xFF0000AA|weight:3|enc:mjr{FsjjL{A}D}E|DxAvD~EwD&path=color:0x0ea001AA|weight:0|fillcolor:0xFFB6C1BB|enc:csr{FcgiLuSm[ rYua@zIvHvCdNcAzKwIeI {A}D}E| DxAvDu@v %5C&path=color:0x0ea001AA|weight:0|fillcolor:0xFFB6C1BB|enc:csr{ FcgiLlRiXwIeI_FvDu@v %5C https://maps.googleapis.com/maps/api/staticmap?size=640x640&maptype=roadmap&zoom=16&path=color:0xFF0000AA|weight:3|enc:csr{FcgiLuSm[ rYua@zIvHvCdNcAzKmRhX &path=color:0xFF0000AA|weight:3|enc:mjr{FsjjL{A}D}E|DxAvD~EwD&path=color:0x0ea001AA|weight:0|fillcolor:0xFFB6C1BB|enc:csr{FcgiLuSm[ rYua@zIvHvCdNcAzKwIeI {A}D}E| DxAvDu@v %5C&path=color:0x0ea001AA|weight:0|fillcolor:0xFFB6C1BB|enc:csr{ FcgiLlRiXwIeI_FvDu@v %5C 
There is a Polyline encoding / decoder utility that can help you see the whole process at https://developers.google.com/maps/documentation/utilities/polylineutility
source share