If users want to configure Public IP they currently need to import IPTypes first and then set ip_type=IPTypes.PUBLIC in the Connector config or during their call to connect.
from google.cloud.alloydb.connector import IPTypes
This is an extra step that is unnecessary, we should support users passing in the IPTypes enum or the string literal value that the enum maps to (i.e "PUBLIC"). This will allow users to not have to import the additional class.
If users want to configure Public IP they currently need to import
IPTypes
first and then setip_type=IPTypes.PUBLIC
in the Connector config or during their call to connect.This is an extra step that is unnecessary, we should support users passing in the
IPTypes
enum or the string literal value that the enum maps to (i.e"PUBLIC"
). This will allow users to not have to import the additional class.https://github.com/GoogleCloudPlatform/alloydb-python-connector/blob/39396eee6ab5a6c8616448fc318f50fdf981db3e/google/cloud/alloydb/connector/instance.py#L44-L50