Skip to content

Commit 73aef85

Browse files
feat: [google-cloud-alloydb] Instance.ActivationPolicy field (#14013)
BEGIN_COMMIT_OVERRIDE feat: Instance.ActivationPolicy field feat: Cluster.DenyMaintenancePeriod field feat: InstanceNetworkConfig.network output field feat: InstanceNetworkConfig.allocated_ip_range_override field feat: Backup.create_completion_time output field docs: A comment for field `earliest_restorable_time` docs: A comment for field `status` in message `PscAutoConnectionConfig` END_COMMIT_OVERRIDE - [ ] Regenerate this pull request now. feat: Cluster.DenyMaintenancePeriod field feat: InstanceNetworkConfig.network output field feat: InstanceNetworkConfig.allocated_ip_range_override field feat: Backup.create_completion_time output field docs: A comment for field `earliest_restorable_time` docs: A comment for field `status` in message `PscAutoConnectionConfig` PiperOrigin-RevId: 772688974 Source-Link: googleapis/googleapis@1a096dc Source-Link: googleapis/googleapis-gen@4ed89b6 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFsbG95ZGIvLk93bEJvdC55YW1sIiwiaCI6IjRlZDg5YjYxYWY1MTk1MWM4YWNhMTJhOWIxMmEyNWYxZTU1MzNhYjkifQ== BEGIN_NESTED_COMMIT feat: [google-cloud-alloydb] Instance.ActivationPolicy field feat: Cluster.DenyMaintenancePeriod field feat: InstanceNetworkConfig.network output field feat: InstanceNetworkConfig.allocated_ip_range_override field feat: Backup.create_completion_time output field docs: A comment for field `earliest_restorable_time` docs: A comment for field `status` in message `PscAutoConnectionConfig` PiperOrigin-RevId: 772665820 Source-Link: googleapis/googleapis@530bb62 Source-Link: googleapis/googleapis-gen@e7a8c99 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFsbG95ZGIvLk93bEJvdC55YW1sIiwiaCI6ImU3YThjOTk0Mjc3ZGM4ODFmMjU2NDUyNzdmMzc0ZjE2MTVkN2NhNDIifQ== END_NESTED_COMMIT --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 0f5860d commit 73aef85

File tree

22 files changed

+526
-75
lines changed

22 files changed

+526
-75
lines changed

packages/google-cloud-alloydb/google/cloud/alloydb/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.4.7" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-alloydb/google/cloud/alloydb_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.4.7" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/async_client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,9 +1799,8 @@ async def sample_restore_cluster():
17991799
18001800
Args:
18011801
request (Optional[Union[google.cloud.alloydb_v1.types.RestoreClusterRequest, dict]]):
1802-
The request object. Message for restoring a Cluster from
1803-
a backup or another cluster at a given
1804-
point in time.
1802+
The request object. Message for restoring a Cluster from a backup or another
1803+
cluster at a given point in time. NEXT_ID: 11
18051804
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
18061805
should be retried.
18071806
timeout (float): The timeout for this request.

packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,9 +2352,8 @@ def sample_restore_cluster():
23522352
23532353
Args:
23542354
request (Union[google.cloud.alloydb_v1.types.RestoreClusterRequest, dict]):
2355-
The request object. Message for restoring a Cluster from
2356-
a backup or another cluster at a given
2357-
point in time.
2355+
The request object. Message for restoring a Cluster from a backup or another
2356+
cluster at a given point in time. NEXT_ID: 11
23582357
retry (google.api_core.retry.Retry): Designation of what errors, if any,
23592358
should be retried.
23602359
timeout (float): The timeout for this request.

packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/transports/rest.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6890,9 +6890,8 @@ def __call__(
68906890
68916891
Args:
68926892
request (~.service.RestoreClusterRequest):
6893-
The request object. Message for restoring a Cluster from
6894-
a backup or another cluster at a given
6895-
point in time.
6893+
The request object. Message for restoring a Cluster from a backup or another
6894+
cluster at a given point in time. NEXT_ID: 11
68966895
retry (google.api_core.retry.Retry): Designation of what errors, if any,
68976896
should be retried.
68986897
timeout (float): The timeout for this request.

packages/google-cloud-alloydb/google/cloud/alloydb_v1/types/resources.py

Lines changed: 154 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from google.protobuf import duration_pb2 # type: ignore
2121
from google.protobuf import timestamp_pb2 # type: ignore
2222
from google.protobuf import wrappers_pb2 # type: ignore
23+
from google.type import date_pb2 # type: ignore
2324
from google.type import dayofweek_pb2 # type: ignore
2425
from google.type import timeofday_pb2 # type: ignore
2526
import proto # type: ignore
@@ -569,11 +570,20 @@ class ContinuousBackupInfo(proto.Message):
569570
ContinuousBackup is not enabled.
570571
schedule (MutableSequence[google.type.dayofweek_pb2.DayOfWeek]):
571572
Output only. Days of the week on which a
572-
continuous backup is taken. Output only field.
573-
Ignored if passed into the request.
573+
continuous backup is taken.
574574
earliest_restorable_time (google.protobuf.timestamp_pb2.Timestamp):
575-
Output only. The earliest restorable time
576-
that can be restored to. Output only field.
575+
Output only. The earliest restorable time that can be
576+
restored to. If continuous backups and recovery was recently
577+
enabled, the earliest restorable time is the creation time
578+
of the earliest eligible backup within this cluster's
579+
continuous backup recovery window. After a cluster has had
580+
continuous backups enabled for the duration of its recovery
581+
window, the earliest restorable time becomes "now minus the
582+
recovery window". For example, assuming a point in time
583+
recovery is attempted at 04/16/2025 3:23:00PM with a 14d
584+
recovery window, the earliest restorable time would be
585+
04/02/2025 3:23:00PM. This field is only visible if the
586+
CLUSTER_VIEW_CONTINUOUS_BACKUP cluster view is provided.
577587
"""
578588

579589
encryption_info: "EncryptionInfo" = proto.Field(
@@ -656,6 +666,9 @@ class MaintenanceUpdatePolicy(proto.Message):
656666
maintenance_windows (MutableSequence[google.cloud.alloydb_v1.types.MaintenanceUpdatePolicy.MaintenanceWindow]):
657667
Preferred windows to perform maintenance.
658668
Currently limited to 1.
669+
deny_maintenance_periods (MutableSequence[google.cloud.alloydb_v1.types.MaintenanceUpdatePolicy.DenyMaintenancePeriod]):
670+
Periods to deny maintenance. Currently
671+
limited to 1.
659672
"""
660673

661674
class MaintenanceWindow(proto.Message):
@@ -683,11 +696,58 @@ class MaintenanceWindow(proto.Message):
683696
message=timeofday_pb2.TimeOfDay,
684697
)
685698

699+
class DenyMaintenancePeriod(proto.Message):
700+
r"""DenyMaintenancePeriod definition. Excepting emergencies, maintenance
701+
will not be scheduled to start within this deny period. The
702+
start_date must be less than the end_date.
703+
704+
Attributes:
705+
start_date (google.type.date_pb2.Date):
706+
Deny period start date. This can be:
707+
708+
- A full date, with non-zero year, month and day values OR
709+
- A month and day value, with a zero year for recurring
710+
end_date (google.type.date_pb2.Date):
711+
Deny period end date. This can be:
712+
713+
- A full date, with non-zero year, month and day values OR
714+
- A month and day value, with a zero year for recurring
715+
time (google.type.timeofday_pb2.TimeOfDay):
716+
Time in UTC when the deny period starts on start_date and
717+
ends on end_date. This can be:
718+
719+
- Full time OR
720+
- All zeros for 00:00:00 UTC
721+
"""
722+
723+
start_date: date_pb2.Date = proto.Field(
724+
proto.MESSAGE,
725+
number=1,
726+
message=date_pb2.Date,
727+
)
728+
end_date: date_pb2.Date = proto.Field(
729+
proto.MESSAGE,
730+
number=2,
731+
message=date_pb2.Date,
732+
)
733+
time: timeofday_pb2.TimeOfDay = proto.Field(
734+
proto.MESSAGE,
735+
number=3,
736+
message=timeofday_pb2.TimeOfDay,
737+
)
738+
686739
maintenance_windows: MutableSequence[MaintenanceWindow] = proto.RepeatedField(
687740
proto.MESSAGE,
688741
number=1,
689742
message=MaintenanceWindow,
690743
)
744+
deny_maintenance_periods: MutableSequence[
745+
DenyMaintenancePeriod
746+
] = proto.RepeatedField(
747+
proto.MESSAGE,
748+
number=2,
749+
message=DenyMaintenancePeriod,
750+
)
691751

692752

693753
class MaintenanceSchedule(proto.Message):
@@ -1358,6 +1418,15 @@ class Instance(proto.Message):
13581418
outbound_public_ip_addresses (MutableSequence[str]):
13591419
Output only. All outbound public IP addresses
13601420
configured for the instance.
1421+
activation_policy (google.cloud.alloydb_v1.types.Instance.ActivationPolicy):
1422+
Optional. Specifies whether an instance needs to spin up.
1423+
Once the instance is active, the activation policy can be
1424+
updated to the ``NEVER`` to stop the instance. Likewise, the
1425+
activation policy can be updated to ``ALWAYS`` to start the
1426+
instance. There are restrictions around when an instance
1427+
can/cannot be activated (for example, a read pool instance
1428+
should be stopped before stopping primary etc.). Please
1429+
refer to the API documentation for more details.
13611430
"""
13621431

13631432
class State(proto.Enum):
@@ -1449,6 +1518,21 @@ class AvailabilityType(proto.Enum):
14491518
ZONAL = 1
14501519
REGIONAL = 2
14511520

1521+
class ActivationPolicy(proto.Enum):
1522+
r"""Specifies whether an instance needs to spin up.
1523+
1524+
Values:
1525+
ACTIVATION_POLICY_UNSPECIFIED (0):
1526+
The policy is not specified.
1527+
ALWAYS (1):
1528+
The instance is running.
1529+
NEVER (2):
1530+
The instance is not running.
1531+
"""
1532+
ACTIVATION_POLICY_UNSPECIFIED = 0
1533+
ALWAYS = 1
1534+
NEVER = 2
1535+
14521536
class MachineConfig(proto.Message):
14531537
r"""MachineConfig describes the configuration of a machine.
14541538
@@ -1734,11 +1818,31 @@ class PscAutoConnectionConfig(proto.Message):
17341818
Output only. The IP address of the PSC
17351819
service automation endpoint.
17361820
status (str):
1737-
Output only. The status of the PSC service
1738-
automation connection.
1821+
Output only. The status of the PSC service automation
1822+
connection. Possible values: "STATE_UNSPECIFIED" - An
1823+
invalid state as the default case. "ACTIVE" - The connection
1824+
has been created successfully. "FAILED" - The connection is
1825+
not functional since some resources on the connection fail
1826+
to be created. "CREATING" - The connection is being created.
1827+
"DELETING" - The connection is being deleted.
1828+
"CREATE_REPAIRING" - The connection is being repaired to
1829+
complete creation. "DELETE_REPAIRING" - The connection is
1830+
being repaired to complete deletion.
17391831
consumer_network_status (str):
1740-
Output only. The status of the service
1741-
connection policy.
1832+
Output only. The status of the service connection policy.
1833+
Possible values: "STATE_UNSPECIFIED" - Default state, when
1834+
Connection Map is created initially. "VALID" - Set when
1835+
policy and map configuration is valid, and their matching
1836+
can lead to allowing creation of PSC Connections subject to
1837+
other constraints like connections limit.
1838+
"CONNECTION_POLICY_MISSING" - No Service Connection Policy
1839+
found for this network and Service Class
1840+
"POLICY_LIMIT_REACHED" - Service Connection Policy limit
1841+
reached for this network and Service Class
1842+
"CONSUMER_INSTANCE_PROJECT_NOT_ALLOWLISTED" - The consumer
1843+
instance project is not in
1844+
AllowedGoogleProducersResourceHierarchyLevels of the
1845+
matching ServiceConnectionPolicy.
17421846
"""
17431847

17441848
consumer_project: str = proto.Field(
@@ -1832,6 +1936,23 @@ class InstanceNetworkConfig(proto.Message):
18321936
Optional. Enabling an outbound public IP
18331937
address to support a database server sending
18341938
requests out into the internet.
1939+
network (str):
1940+
Output only. The resource link for the VPC network in which
1941+
instance resources are created and from which they are
1942+
accessible via Private IP. This will be the same value as
1943+
the parent cluster's network. It is specified in the form:
1944+
//
1945+
``projects/{project_number}/global/networks/{network_id}``.
1946+
allocated_ip_range_override (str):
1947+
Optional. Name of the allocated IP range for the private IP
1948+
AlloyDB instance, for example:
1949+
"google-managed-services-default". If set, the instance IPs
1950+
will be created from this allocated range and will override
1951+
the IP range used by the parent cluster. The range name must
1952+
comply with `RFC
1953+
1035 <http://datatracker.ietf.org/doc/html/rfc1035>`__.
1954+
Specifically, the name must be 1-63 characters long and
1955+
match the regular expression `a-z <[-a-z0-9]*[a-z0-9]>`__?.
18351956
"""
18361957

18371958
class AuthorizedNetwork(proto.Message):
@@ -1864,6 +1985,14 @@ class AuthorizedNetwork(proto.Message):
18641985
proto.BOOL,
18651986
number=3,
18661987
)
1988+
network: str = proto.Field(
1989+
proto.STRING,
1990+
number=4,
1991+
)
1992+
allocated_ip_range_override: str = proto.Field(
1993+
proto.STRING,
1994+
number=5,
1995+
)
18671996

18681997
name: str = proto.Field(
18691998
proto.STRING,
@@ -1995,6 +2124,11 @@ class AuthorizedNetwork(proto.Message):
19952124
proto.STRING,
19962125
number=34,
19972126
)
2127+
activation_policy: ActivationPolicy = proto.Field(
2128+
proto.ENUM,
2129+
number=35,
2130+
enum=ActivationPolicy,
2131+
)
19982132

19992133

20002134
class ConnectionInfo(proto.Message):
@@ -2066,8 +2200,15 @@ class Backup(proto.Message):
20662200
Output only. Create time stamp
20672201
update_time (google.protobuf.timestamp_pb2.Timestamp):
20682202
Output only. Update time stamp
2203+
2204+
Users should not infer any meaning from this
2205+
field. Its value is generally unrelated to the
2206+
timing of the backup creation operation.
20692207
delete_time (google.protobuf.timestamp_pb2.Timestamp):
20702208
Output only. Delete time stamp
2209+
create_completion_time (google.protobuf.timestamp_pb2.Timestamp):
2210+
Output only. Timestamp when the resource
2211+
finished being created.
20712212
labels (MutableMapping[str, str]):
20722213
Labels as key value pairs
20732214
state (google.cloud.alloydb_v1.types.Backup.State):
@@ -2244,6 +2385,11 @@ class QuantityBasedExpiry(proto.Message):
22442385
number=15,
22452386
message=timestamp_pb2.Timestamp,
22462387
)
2388+
create_completion_time: timestamp_pb2.Timestamp = proto.Field(
2389+
proto.MESSAGE,
2390+
number=26,
2391+
message=timestamp_pb2.Timestamp,
2392+
)
22472393
labels: MutableMapping[str, str] = proto.MapField(
22482394
proto.STRING,
22492395
proto.STRING,

packages/google-cloud-alloydb/google/cloud/alloydb_v1/types/service.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ class StageInfo(proto.Message):
884884
)
885885

886886
class InstanceUpgradeDetails(proto.Message):
887-
r"""Details regarding the upgrade of instaces associated with a
887+
r"""Details regarding the upgrade of instances associated with a
888888
cluster.
889889
890890
Attributes:
@@ -1162,8 +1162,8 @@ class PromoteClusterRequest(proto.Message):
11621162

11631163

11641164
class RestoreClusterRequest(proto.Message):
1165-
r"""Message for restoring a Cluster from a backup or another
1166-
cluster at a given point in time.
1165+
r"""Message for restoring a Cluster from a backup or another cluster at
1166+
a given point in time. NEXT_ID: 11
11671167
11681168
This message has `oneof`_ fields (mutually exclusive fields).
11691169
For each oneof, at most one member field can be set at the same time.

packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.4.7" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.4.7" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/async_client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,9 +1805,8 @@ async def sample_restore_cluster():
18051805
18061806
Args:
18071807
request (Optional[Union[google.cloud.alloydb_v1beta.types.RestoreClusterRequest, dict]]):
1808-
The request object. Message for restoring a Cluster from
1809-
a backup or another cluster at a given
1810-
point in time.
1808+
The request object. Message for restoring a Cluster from a backup or another
1809+
cluster at a given point in time. NEXT_ID: 11
18111810
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
18121811
should be retried.
18131812
timeout (float): The timeout for this request.

0 commit comments

Comments
 (0)