Skip to content

Commit

Permalink
fix(deps): [google-cloud-alloydb] Exclude google-auth 2.24.0 and 2.25…
Browse files Browse the repository at this point in the history
….0 (#12365)

- [ ] Regenerate this pull request now.

chore: Update gapic-generator-python to v1.14.4

PiperOrigin-RevId: 611561820

Source-Link:
googleapis/googleapis@87ef1fe

Source-Link:
googleapis/googleapis-gen@1973161
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFsbG95ZGIvLk93bEJvdC55YW1sIiwiaCI6IjE5NzMxNjEzNzU5NGFhZmFkOTRkZWEzMTIyNjUyOGZiY2MzOTMxMGMifQ==

BEGIN_COMMIT_OVERRIDE
fix(deps): Exclude google-auth 2.24.0 and 2.25.0
feat: Add support for obtaining the public IP address of an Instance
feat: Add support for getting PSC DNS name from the GetConnectionInfo
API
feat: Add PSC cluster and instance configuration settings to
enable/disable PSC and obtain the PSC endpoint name
feat: Add new API to list the databases in a project and location
docs: Clarified read pool config is for read pool type instances
END_COMMIT_OVERRIDE

BEGIN_NESTED_COMMIT
feat: [google-cloud-alloydb] support for obtaining the public IP address
of an Instance
feat: support for getting PSC DNS name from the GetConnectionInfo API
feat: add PSC cluster and instance configuration settings to
enable/disable PSC and obtain the PSC endpoint name
feat: add new API to list the databases in a project and location
docs: clarified read pool config is for read pool type instances

PiperOrigin-RevId: 610475013

Source-Link:
googleapis/googleapis@aa16fda

Source-Link:
googleapis/googleapis-gen@9ccc90e
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFsbG95ZGIvLk93bEJvdC55YW1sIiwiaCI6IjljY2M5MGVjYmY0NWQ4YjA2NWI1MjA1OTdmYWJiNjRmZDQxNTY3OGQifQ==
END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
feat: [google-cloud-alloydb] support for obtaining the public IP address
of an Instance
feat: support for getting PSC DNS name from the GetConnectionInfo API

PiperOrigin-RevId: 610415824

Source-Link:
googleapis/googleapis@0733fdb

Source-Link:
googleapis/googleapis-gen@49fd8e0
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFsbG95ZGIvLk93bEJvdC55YW1sIiwiaCI6IjQ5ZmQ4ZTA4OWZlZGE1ZDI5M2QxODgwMjU0OGRiNTJjM2ZiZmI3MGMifQ==
END_NESTED_COMMIT

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
3 people committed Mar 4, 2024
1 parent c88cdce commit 3f2a93c
Show file tree
Hide file tree
Showing 26 changed files with 5,025 additions and 2,838 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.3.9" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.3.9" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.3.9" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,10 @@ class Instance(proto.Message):
Output only. The IP address for the Instance.
This is the connection endpoint for an end-user
application.
public_ip_address (str):
Output only. The public IP addresses for the Instance. This
is available ONLY when enable_public_ip is set. This is the
connection endpoint for an end-user application.
reconciling (bool):
Output only. Reconciling
(https://google.aip.dev/128#reconciliation). Set
Expand Down Expand Up @@ -1657,6 +1661,10 @@ class AuthorizedNetwork(proto.Message):
proto.STRING,
number=15,
)
public_ip_address: str = proto.Field(
proto.STRING,
number=27,
)
reconciling: bool = proto.Field(
proto.BOOL,
number=16,
Expand Down Expand Up @@ -1725,6 +1733,9 @@ class ConnectionInfo(proto.Message):
to RFC 5246.
instance_uid (str):
Output only. The unique ID of the Instance.
psc_dns_name (str):
Output only. The DNS name to use with PSC for
the Instance.
"""

name: str = proto.Field(
Expand All @@ -1747,6 +1758,10 @@ class ConnectionInfo(proto.Message):
proto.STRING,
number=4,
)
psc_dns_name: str = proto.Field(
proto.STRING,
number=6,
)


class Backup(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
ContinuousBackupConfig,
ContinuousBackupInfo,
ContinuousBackupSource,
Database,
DatabaseVersion,
EncryptionConfig,
EncryptionInfo,
Expand Down Expand Up @@ -69,6 +70,8 @@
ListBackupsResponse,
ListClustersRequest,
ListClustersResponse,
ListDatabasesRequest,
ListDatabasesResponse,
ListInstancesRequest,
ListInstancesResponse,
ListSupportedDatabaseFlagsRequest,
Expand Down Expand Up @@ -108,6 +111,7 @@
"CreateSecondaryClusterRequest",
"CreateSecondaryInstanceRequest",
"CreateUserRequest",
"Database",
"DatabaseVersion",
"DeleteBackupRequest",
"DeleteClusterRequest",
Expand All @@ -130,6 +134,8 @@
"ListBackupsResponse",
"ListClustersRequest",
"ListClustersResponse",
"ListDatabasesRequest",
"ListDatabasesResponse",
"ListInstancesRequest",
"ListInstancesResponse",
"ListSupportedDatabaseFlagsRequest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@
"list_clusters"
]
},
"ListDatabases": {
"methods": [
"list_databases"
]
},
"ListInstances": {
"methods": [
"list_instances"
Expand Down Expand Up @@ -275,6 +280,11 @@
"list_clusters"
]
},
"ListDatabases": {
"methods": [
"list_databases"
]
},
"ListInstances": {
"methods": [
"list_instances"
Expand Down Expand Up @@ -435,6 +445,11 @@
"list_clusters"
]
},
"ListDatabases": {
"methods": [
"list_databases"
]
},
"ListInstances": {
"methods": [
"list_instances"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.3.9" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ class AlloyDBAdminAsyncClient:
parse_crypto_key_version_path = staticmethod(
AlloyDBAdminClient.parse_crypto_key_version_path
)
database_path = staticmethod(AlloyDBAdminClient.database_path)
parse_database_path = staticmethod(AlloyDBAdminClient.parse_database_path)
instance_path = staticmethod(AlloyDBAdminClient.instance_path)
parse_instance_path = staticmethod(AlloyDBAdminClient.parse_instance_path)
network_path = staticmethod(AlloyDBAdminClient.network_path)
Expand Down Expand Up @@ -4195,6 +4197,133 @@ async def sample_delete_user():
metadata=metadata,
)

async def list_databases(
self,
request: Optional[Union[service.ListDatabasesRequest, dict]] = None,
*,
parent: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListDatabasesAsyncPager:
r"""Lists Databases in a given project and location.
.. code-block:: python
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import alloydb_v1beta
async def sample_list_databases():
# Create a client
client = alloydb_v1beta.AlloyDBAdminAsyncClient()
# Initialize request argument(s)
request = alloydb_v1beta.ListDatabasesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_databases(request=request)
# Handle the response
async for response in page_result:
print(response)
Args:
request (Optional[Union[google.cloud.alloydb_v1beta.types.ListDatabasesRequest, dict]]):
The request object. Message for requesting list of
Databases.
parent (:class:`str`):
Required. Parent value for
ListDatabasesRequest.
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
sent along with the request as metadata.
Returns:
google.cloud.alloydb_v1beta.services.alloy_db_admin.pagers.ListDatabasesAsyncPager:
Message for response to listing
Databases.
Iterating over this object will yield
results and resolve additional pages
automatically.
"""
# Create or coerce a protobuf request object.
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent])
if request is not None and has_flattened_params:
raise ValueError(
"If the `request` argument is set, then none of "
"the individual field arguments should be set."
)

request = service.ListDatabasesRequest(request)

# If we have keyword arguments corresponding to fields on the
# request, apply these.
if parent is not None:
request.parent = parent

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.list_databases,
default_retry=retries.AsyncRetry(
initial=1.0,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=DEFAULT_CLIENT_INFO,
)

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)),
)

# Validate the universe domain.
self._client._validate_universe_domain()

# Send the request.
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# This method is paged; wrap the response in a pager, which provides
# an `__aiter__` convenience method.
response = pagers.ListDatabasesAsyncPager(
method=rpc,
request=request,
response=response,
metadata=metadata,
)

# Done; return the response.
return response

async def list_operations(
self,
request: Optional[operations_pb2.ListOperationsRequest] = None,
Expand Down
Loading

0 comments on commit 3f2a93c

Please sign in to comment.